Function: get_dynamic_batch
Applicable Products
- Ascend 950PR&950DT products: Supported
- Atlas A3 products: Supported
- Atlas A2 products: Supported
- Atlas 200I/500 A2 inference products: Supported
- Atlas inference products: Supported
- Atlas training products: Supported
Function
Obtains the dynamic batch size information supported by a model based on the model description.
Prototype
-
C Prototype
aclError aclmdlGetDynamicBatch(const aclmdlDesc *modelDesc, aclmdlBatch *batch) -
Python Function
batch, ret = acl.mdl.get_dynamic_batch(model_desc)
Parameters
| Parameter | Description |
|---|---|
| model_desc | Int, pointer address of the data of the aclmdlDesc type. Call the acl.mdl.create_desc API to create data of the aclmdlDesc type in advance. |
Return Values
| Return Value | Description |
|---|---|
| batch | Dict, dynamic batch information supported by the obtained model. The maximum number of batches supported by the model is 128. batch = { "batchCount": int, # Number of batch size profiles supported by the model. "batch": [xx, xx,] # Specific batch size profiles supported by the model.} - If batchCount is 0, the batch size profile information cannot be set and the batch size profile in the model is used. |
| ret | Int, error code.0: successOther values: failure |