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

#### 产品支持情况

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


#### 头文件/库文件

- 头文件：#include <ge/ge_prof.h>
- 库文件：libmsprofiler.so


#### 功能说明

初始化Profiling，设置Profiling参数（目前供用户设置保存性能数据文件的路径）。


#### 函数原型

```
Status aclgrphProfInit(const char *profiler_path, uint32_t length)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| profiler\_path | 输入 | 指定保存性能数据的文件的路径，路径支持绝对路径和相对路径。 |
| length | 输入 | profiler\_path的长度，单位为字节。最大长度不超过4096字节。 |


#### 返回值说明

| 参数名 | 类型 | 说明 |
| --- | --- | --- |
| \- | Status | SUCCESS：成功。 FAILED：失败。 ACL\_ERROR\_FEATURE\_UNSUPPORTED：动态Profiling场景下不支持调用aclgrphProfInit接口。 |


#### 约束说明

- 不支持多次重复调用aclgrphProfInit，并且该接口需和  aclgrphProfFinalize
配对使用，先调用aclgrphProfInit接口再调用aclgrphProfFinalize接口。
- 建议该接口在  GEInitialize
之后，  AddGraph
之前被调用，可采集到AddGraph时的Profiling数据。
