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

#### 产品支持情况

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


#### 功能说明

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


#### 函数原型

```
aclError aclmdlGetDynamicHW(const aclmdlDesc *modelDesc, size_t index, aclmdlHW *hw)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| modelDesc | 输入 | aclmdlDesc类型的指针。 需提前调用aclmdlCreateDesc接口创建aclmdlDesc类型的数据。 |
| index | 输入 | 预留参数，当前未使用，固定设置为\-1。 |
| hw | 输出 | const int ACL\_MAX\_HW\_NUM = 128; typedef struct aclmdlHW { size\_t hwCount; /\*\*模型中支持的宽高分档数 \*/ uint64\_t hw[ACL\_MAX\_HW\_NUM][2]; /\*\*模型中支持的具体分档，每组分档中，数组下标为0代表的是高，下标为1代表的是宽 \*/ } aclmdlHW; hwCount等于0时，表示不支持设置档位信息，以模型中的档位为准。 |


#### 返回值说明

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