HcommBatchModeEnd

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

For Atlas A2 training product/Atlas A2 inference product, only the Atlas 800T A2 training server, Atlas 900 A2 PoD cluster basic unit, and Atlas 200T A2 Box16 heterogeneous subrack are supported.

Function

Submits and triggers the execution of all operations cached in batch mode. All data plane API call operations between HcommBatchModeStart and HcommBatchModeEnd will be executed collectively at this point.

Prototype

1
int32_t HcommBatchModeEnd(const char *batchTag)

Parameters

Parameter

Input/Output

Description

batchTag

Input

Batch task identifier, which must be the same batchTag passed to HcommBatchModeStart.

Returns

int32_t: 0 on success; else, failure.

Restrictions

HcommBatchModeStart and HcommBatchModeEnd must be called in pairs and executed in the same thread.

Only the Atlas 350 Accelerator Card supports both batch mode and immediate execution mode (without calling batch APIs). Other products must use batch mode.

Example

1
2
3
4
5
6
7
8
9
char *tag = "";
// Start the batch mode (a temporary batch task).
HcommBatchModeStart(tag);

// In batch mode, calls to data plane APIs are not executed immediately.
// ...

// End the batch mode and trigger execution.
HcommBatchModeEnd(tag);