aclprofCreateConfig
Description
Creates data of the aclprofConfig type as a Profiling configuration.
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.
Restrictions
- Use the aclprofDestroyConfig API to destroy data of the aclprofConfig type. If data is not destroyed, the memory cannot be freed.
- Use this API together with the aclprofDestroyConfig API. Call aclprofCreateConfig first and then aclprofDestroyConfig.
Prototype
aclprofConfig *aclprofCreateConfig(uint32_t *deviceIdList, uint32_t deviceNums, aclprofAicoreMetrics aicoreMetrics, const aclprofAicoreEvents *aicoreEvents, uint64_t dataTypeConfig)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
deviceIdList |
Input |
Device ID list. Set this parameter based on the actual device ID. |
|
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.
|
Returns
- Success: a pointer to data of the aclprofConfig type
- Failure: nullptr