---
title: 函数：init
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/runtimeapi/aclpythondevg_01_0851.html
sourcePath: /source/zh/canncommercial/900/API/runtimeapi/aclpythondevg_01_0851.html
indexId: f5587cdbe304c073ff07d35e65cafd90012598275445469833fb4166257ff7fb71
---
# 函数：init

#### 产品支持情况

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


#### 功能说明

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


#### 函数原型

- C函数原型
  1 aclError aclprofInit(const char *profilerResultPath, size_t length)

- python函数
  1 ret = acl.prof.init(profiler_result_path)


#### 参数说明

| 参数名 | 说明 |
| --- | --- |
| profiler\_result\_path | str，指定保存性能数据的文件的路径，此路径为绝对路径。 |


#### 返回值说明

| 返回值 | 说明 |
| --- | --- |
| ret | int，错误码。 返回0表示成功。 返回其它值表示失败。 |


#### 约束说明

与acl.prof.finalize接口配对使用，先调用acl.prof.init接口再调用acl.prof.finalize接口。
