Function: create_subscribe_config

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

Atlas inference products

Atlas 200I/500 A2 inference products

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
    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)
    

Parameter Description

Parameter

Description

time_info_switch

Int, whether to enable operator profiling in the model.

  • 1: enable
  • 0: disable

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.

  • 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