Function: create_config
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
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 Function: destroy_config.
Prototype
- C Prototype
1aclprofConfig *aclprofCreateConfig(uint32_t *deviceIdlist, uint32_t deviceNums, aclprofAicoreMetrics aicoreMetrics, aclprofAicoreEvents *aicoreEvents, uint64_t dataTypeConfig)
- Python Function
1prof_config = acl.prof.create_config(device_list, aicore_metrics, aicore_events, data_type_config)
Parameter Description
Parameter |
Description |
|---|---|
device_list |
List, device ID list. Set this parameter based on the actual device ID. |
aicore_metrics |
Int, aclprofAicoreMetrics. |
aicore_events |
Int, AI Core event, which is set to 0. |
data_type_config |
Int. Select from the following aclproftype values in logical OR format (for example, ACL_PROF_ACL_API|ACL_PROF_AICORE_METRICS) as the parameter value of data_type_config. Each value indicates a type of profile data.
|
Return Value Description
Return Value |
Description |
|---|---|
prof_config |
Int.
|
Restrictions
- Use the acl.prof.destroy_config API to destroy data of the aclprofConfig type. If data is not destroyed, the memory cannot be freed.
- Use this API together with the acl.prof.destroy_config API. Call acl.prof.create_config first and then acl.prof.destroy_config.