Function: create_subscribe_config
Applicable Products
- Ascend 950PR&950DT products: Supported
- Atlas A3 products: Supported
- Atlas A2 products: Supported
- Atlas 200I/500 A2 inference products: Supported
- Atlas inference products: Supported
- Atlas training products: Supported
Function
Creates the data of the aclprofSubscribeConfig type as a subscription configuration.
To destroy data of the aclprofSubscribeConfig type, see acl.prof.destroy_subscribe_config.
Prototype
-
C Prototype
aclprofSubscribeConfig *aclprofCreateSubscribeConfig(int8_t timeInfoSwitch, aclprofAicoreMetrics aicoreMetrics, void *fd) -
Python Function
subscribe_config = acl.prof.create_subscribe_config(time_info_switch, aicore_metrics, fd)
Parameters
| Parameter | Description |
|---|---|
| time_info_switch | Int, whether to enable operator profiling in the model.1: yes0: no |
| aicore_metrics | Int, AI Core performance metrics. For details, see aclprofAicoreMetrics. 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 pipe write file descriptor of the model after the data is sent. |
Return Values
| Return Value | Description |
|---|---|
| subscribe_config | Int If a non-zero value is returned, the operation is successful. In this case, the address object of aclprofSubscribeConfig is returned.If 0 is returned, the operation fails. |
Constraints
-
Call acl.prof.destroy_subscribe_config to destroy data of the
aclprofSubscribeConfigtype. If the data is not destroyed, the memory will not be freed. -
This API is used in pair with acl.prof.destroy_subscribe_config. Call
acl.prof.create_subscribe_configbefore acl.prof.destroy_subscribe_config.