Function: create_subscribe_config
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Creates the data of the aclprofSubscribeConfig type as a subscription configuration.
To destroy data of the aclprofSubscribeConfig type, call acl.prof.destroy_subscribe_config.
Prototype
- C Prototype
1aclprofSubscribeConfig *aclprofCreateSubscribeConfig(int8_t timeInfoSwitch, aclprofAicoreMetrics aicoreMetrics, void *fd)
- Python Function
1subscribe_config = acl.prof.create_subscribe_config(time_info_switch, aicore_metrics, fd)
Parameter Description
Parameter |
Description |
|---|---|
time_info_switch |
Int, whether to enable operator profiling in the model.
|
aicore_metrics |
Int, AI Core metrics. For details, see aclprofAicoreMetrics. NOTE:
This API traces operator call duration only and does not support profiling of AI Core metrics. |
fd |
Int, write file descriptor of the pipe created by the user. After acl.prof.model_unsubscribe is called, the system closes the pipeline write file descriptor of the model after data is sent. |
Return Value Description
Return Value |
Description |
|---|---|
subscribe_config |
Int.
|
Restrictions
- Use the acl.prof.destroy_subscribe_config API to destroy data of the aclprofSubscribeConfig type. If data is not destroyed, the memory cannot be freed.
- Use this API together with the acl.prof.destroy_subscribe_config API. Call acl.prof.create_subscribe_config first and then acl.prof.destroy_subscribe_config.