---
title: aclprofInit
description: 初始化Profiling，目前用于设置保存性能数据的文件的路径。同步接口。
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgc/aclcppdevg_03_1574.html"
---

# aclprofInit

#### 函数功能

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


#### 约束说明

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


#### 函数原型

aclError aclprofInit(const char *profilerResultPath, size_t length)


#### 参数说明

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


#### 返回值说明

返回0表示成功，返回其它值表示失败。


#### 参考资源

接口调用示例，参见Profiling性能数据采集。
