---
title: aclprofInit
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclcppdevg_03_1258.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclcppdevg_03_1258.html
indexId: f0b860516005a62ec0bad9984378ee6ad036ce60526981ba8f8bec5c2d297bbd68
---
# aclprofInit

#### 产品支持情况

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


#### 功能说明

初始化Profiling，目前用于设置保存性能数据的文件的路径。


#### 函数原型

```
aclError aclprofInit(const char *profilerResultPath, size_t length)
```


#### 参数说明

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


#### 返回值说明

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


#### 约束说明

与aclprofFinalize接口配对使用，先调用aclprofInit接口再调用aclprofFinalize接口。
