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

#### 产品支持情况

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


#### 功能说明

根据模型文件获取该模型的模型描述信息。

通过本接口获取到的模型描述信息，无法应用于aclmdlGetOpAttr、aclmdlGetCurOutputDims接口。


#### 函数原型

```
aclError aclmdlGetDescFromFile(aclmdlDesc *modelDesc, const char *modelPath)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| modelDesc | 输出 | aclmdlDesc类型的指针。 需提前调用aclmdlCreateDesc接口创建aclmdlDesc类型的数据。 |
| modelPath | 输入 | 模型文件路径的指针，路径中包含文件名。运行程序（APP）的用户需要对该存储路径有访问权限。 此处的模型文件是om模型文件。关于如何获取om模型文件，请参见《ATC离线模型编译工具(https://www.hiascend.com/document/detail/zh/canncommercial/900/devaids/atctool/atlasatc\_16\_0001.html)》中的“参数说明 > 基础功能参数 > 总体选项 > \-\-mode参数(https://www.hiascend.comdocument/detail/zh/canncommercial/900/devaids/atctool/atlasatcparam\_16\_0009.html)”。 |


#### 返回值说明

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