aclprofModelSubscribe

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

Subscribes to basic operator information in the model, including the operator name, operator type, and operator execution time.

Prototype

1
aclError aclprofModelSubscribe(uint32_t modelId, const aclprofSubscribeConfig *profSubscribeConfig)

Parameters

Parameter

Input/Output

Description

modelId

Input

ID of the model to subscribe.

A successful aclmdlLoadFromFile, aclmdlLoadFromMem, aclmdlLoadFromFileWithMem, or aclmdlLoadFromMemWithMem call returns a model ID.

profSubscribeConfig

Input

Subscription configuration.

Call aclprofCreateSubscribeConfig to create data of the aclprofSubscribeConfig type in advance.

Returns

0 on success; otherwise, failure. For details, see aclError.

Restrictions

This API must be used in pair with aclprofModelUnSubscribe.