aclprofCreateConfig
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Creates data of the aclprofConfig type as a Profiling configuration.
Created aclProfConfig data can be reused in multiple calls. You need 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
1 | 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. For details about the type definition, see aclprofConfig and aclprofAicoreMetrics. |
deviceNums |
Input |
Device count. Ensure that the number of devices in deviceIdList matches deviceNums. Otherwise, service exceptions may occur subsequently. |
aicoreMetrics |
Input |
AI Core metric to profile. For details, see aclprofAicoreMetrics. |
aicoreEvents |
Input |
AI Core event, which is set to NULL. |
dataTypeConfig |
Input |
Logical OR result of macros from the following list (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