aclgrphProfInit

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference products

Atlas training products

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 4096 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 and must be used in pair with aclgrphProfFinalize. In addition, aclgrphProfInit must be called before aclgrphProfFinalize.
  • It is recommended that aclgrphProfInit be called after GEInitialize and before AddGraph to collect the profile data for AddGraph.