aclprofCreateSubscribeConfig

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Function

Creates data of the aclprofSubscribeConfig type as a subscription configuration.

To destroy data of the aclprofSubscribeConfig type, call aclprofDestroySubscribeConfig.

Restrictions

  • Use the aclprofDestroySubscribeConfig API to destroy data of the aclprofSubscribeConfig type. If data is not destroyed, the memory cannot be freed.

Prototype

1
aclprofSubscribeConfig *aclprofCreateSubscribeConfig(int8_t timeInfoSwitch, aclprofAicoreMetrics aicoreMetrics, void *fd)

Parameters

Parameter

Input/Output

Description

timeInfoSwitch

Input

Whether to enable operator profiling in the network model.

  • 1: enable
  • 0: disable

For details about the type definition, see aclprofSubscribeConfig and aclprofAicoreMetrics.

aicoreMetrics

Input

AI Core metric to profile.

NOTE:

This API traces operator call duration only and does not support profiling of AI Core metrics.

fd

Input

Write pointer to the pipeline created by the user.

After aclprofModelUnSubscribe is called, the system closes the pipeline write pointer of the model after data is sent.

Returns

  • Success: pointer to data of the aclprofSubscribeConfig type
  • Failure: nullptr