aclgrphProfCreateConfig

Applicable Products

  • Ascend 950PR/Ascend 950DT: supported
  • Atlas A3 training products/Atlas A3 inference products: supported
  • Atlas A2 training products/Atlas A2 inference products: supported
  • Atlas 200I/500 A2 inference products: not supported
  • Atlas inference products: supported
  • Atlas training products: supported

Header File/Library File

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

Function Usage

Creates a profiling configuration.

Prototype

1
aclgrphProfConfig *aclgrphProfCreateConfig(uint32_t *deviceid_list, uint32_t device_nums, ProfilingAicoreMetrics aicore_metrics, ProfAicoreEvents *aicore_events, uint64_t data_type_config)

Parameters

Parameter

Input/Output

Description

deviceid_list

Input

IDs of devices to profile.

device_nums

Input

Device count. The same as the number of device IDs in deviceid_list.

aicore_metrics

Input

AI Core metrics. For the enum values, see ProfilingAicoreMetrics.

aicore_events

Input

(Reserved) AI Core events.

data_type_config

Input

Type of profile data to be collected. For details, see ProfDataTypeConfig.

Pass bitwise OR types of data to output multiple types of data.

Returns

Parameter

Type

Description

aclgrphProfConfig

aclgrphProfConfig *

Pointer to a struct for a profiling configuration.

Restrictions

  • The created aclgrphProfConfig data can be reused in multiple calls. You need to ensure the consistency and accuracy of the data.
  • This API must be used with aclgrphProfDestroyConfig and must be called before aclgrphProfDestroyConfig.
  • Ensure that all created profiling configurations are destroyed by the aclgrphProfDestroyConfig call after the process ends, to prevent memory leak.
  • To specify different profiling configurations on different devices, you can create more data of type aclgrphProfConfig and call aclgrphProfStart to deliver the configurations to the devices in sequence. Note that the device information must be unique.