Function: create_subscribe_config

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

Description

Creates the data of the aclprofSubscribeConfig type for subscription configuration.

To destroy data of the aclprofSubscribeConfig type, call acl.prof.destroy_subscribe_config.

Prototype

  • C Prototype
    1
    aclprofSubscribeConfig *aclprofCreateSubscribeConfig(int8_t timeInfoSwitch, aclprofAicoreMetrics aicoreMetrics, void *fd)
    
  • Python Function
    1
    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.

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

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.

Restrictions