Function: create_subscribe_config

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)

Function Usage

Creates the data of the aclprofSubscribeConfig type for subscription configuration.

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

Input Description

time_info_switch: int, whether to collect profile data of operators in the model.

  • 1: yes
  • 0: no

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

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