aclgrphProfCreateConfig
Description
Creates a Profiling configuration.
Prototype
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.
- aclgrphProfCreateConfig must be used in pair with and 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.
Parent topic: Maintenance and Test APIs