aclprofCreateConfig

Description

Creates data of the aclprofConfig type as a Profiling configuration. This API is synchronous.

Created aclProfConfig data can be reused in multiple calls. The user needs to ensure the consistency and accuracy of the data.

To destroy data of the aclprofConfig type, call aclprofDestroyConfig.

Instructions

Prototype

aclprofConfig *aclprofCreateConfig(uint32_t *deviceIdList, uint32_t deviceNums, aclprofAicoreMetrics aicoreMetrics, aclprofAicoreEvents *aicoreEvents, uint64_t dataTypeConfig)

Parameters

Parameter

Input/Output

Description

deviceIdList

Input

Device ID list

deviceNums

Input

Device count. Ensure that the number of devices in deviceIdList is the same as that of deviceNums. Otherwise, service exceptions may occur subsequently.

aicoreMetrics

Input

AI Core metric to profile.

aicoreEvents

Input

AI Core event, which is set to NULL.

dataTypeConfig

Input

Logically ORed by the following macros (for example, ACL_PROF_ACL_API | ACL_PROF_AICORE_METRICS). Each macro corresponds to a specific metric.

  • ACL_PROF_ACL_API: collects profile data of AscendCL APIs, including the synchronous/asynchronous memory copy latency between the host and devices as well as between devices.
  • ACL_PROF_TASK_TIME: collects the execution time of AI Core operators, including the synchronous/asynchronous memory copy delay between the host and devices as well as between devices.
  • ACL_PROF_AICORE_METRICS: collects AI Core metrics. Required for aicoreMetrics to take effect.
  • ACL_PROF_AICPU: collects data of AI CPU tasks, including the start and end of each task.
  • ACL_PROF_L2CACHE: collects L2 Cache data.
  • ACL_PROF_HCCL_TRACE: collects HCCL data.
  • ACL_PROF_MSPROFTX: collects the profile data output by the user and high-level framework program.
  • ACL_PROF_RUNTIME_API: collects runtime API profile data.

Returns