---
title: aclmdlGetDynamicBatch
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/aclcppdevg_03_1464.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/aclcppdevg_03_1464.html
indexId: 292c1ab3f0ca629f09f826e0f6bea817d18cfccaa2652d55318be51b91ccadef72
---
# aclmdlGetDynamicBatch

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 功能说明

根据模型描述信息获取模型支持的动态Batch信息。


#### 函数原型

```
aclError aclmdlGetDynamicBatch(const aclmdlDesc *modelDesc, aclmdlBatch *batch)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| modelDesc | 输入 | aclmdlDesc类型的指针。 需提前调用aclmdlCreateDesc接口创建aclmdlDesc类型的数据。 |
| batch | 输出 | const int ACL\_MAX\_BATCH\_NUM = 128; typedef struct aclmdlBatch { size\_t batchCount; /\*\*模型中支持的batch分档数 \*/ uint64\_t batch[ACL\_MAX\_BATCH\_NUM]; /\*\*模型中支持的具体分档 \*/ } aclmdlBatch; batchCount等于0时，表示不支持设置档位信息，以模型中的档位为准。 |


#### 返回值说明

返回0表示成功，返回其他值表示失败，请参见aclError。
