Function: model_subscribe

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

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

Prototype

  • C Prototype

    aclError aclprofModelSubscribe(uint32_t modelId, const aclprofSubscribeConfig *profSubscribeConfig)
    
  • Python Function

    ret = acl.prof.model_subscribe(model_id, subscribe_config)
    

Parameters

Parameter Description
model_id Int, ID of the model to be subscribed to.
acl.mdl.load_from_file
acl.mdl.load_from_mem
acl.mdl.load_from_file_with_mem
acl.mdl.load_from_mem_with_mem
The model ID is returned after a model is successfully loaded by calling the APIs.
subscribe_config Int, configuration to be subscribed to. Call acl.prof.create_subscribe_config to create configuration data.

Return Values

Return Value Description
ret Int, error code.
0: success
If other values are returned, the operation fails.

Constraints

This API must be used in pair with acl.prof.model_unsubscribe.