Obtains the dynamic batch size information supported by a model based on the model description. This API is synchronous.
aclError aclmdlGetDynamicBatch(const aclmdlDesc *modelDesc, aclmdlBatch *batch)
Parameter |
Input/Output |
Description |
|---|---|---|
modelDesc |
Input |
Pointer to data of the aclmdlDesc type. Call aclmdlCreateDesc to create data of the aclmdlDesc type in advance. |
batch |
Output |
const int ACL_MAX_BATCH_NUM = 128;
typedef struct aclmdlBatch {
size_t batchCount; /**Number of batch size profiles supported by the model*/
uint64_t batch[ACL_MAX_BATCH_NUM]; /**Batch size profiles*/
} aclmdlBatch; If batchCount is 0, dynamic batch size is not supported. The batch size defined in the model applies. |
0 on success; else, failure.