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: yes
0: 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