aclgrphProfInit

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

Atlas training product

Header File/Library File

  • Header file: #include <ge/ge_prof.h>
  • Library file: libmsprofiler.so

Function Usage

Initializes profiling and sets profiling parameters. (Currently, you can specify the path for saving profile data files.)

Prototype

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

Parameters

Parameter

Input/Output

Description

profiler_path

Input

An absolute or relative path for saving profile data files.

length

Input

Length of profiler_path, in bytes. The maximum length is 4,096 bytes.

Returns

Parameter

Type

Description

-

Status

SUCCESS: success.

FAILED: failure.

ACL_ERROR_FEATURE_UNSUPPORTED: The aclgrphProfInit API cannot be called in the dynamic profiling scenario.

Restrictions

  • aclgrphProfInit cannot be called repeatedly. In addition, it must be called in pair with, and before, aclgrphProfFinalize.
  • It is recommended that aclgrphProfInit be called after GEInitialize and before AddGraph to collect the profile data for AddGraph.