Overview
General Restrictions
The acl.prof.init, acl.prof.start, acl.prof.stop, and acl.prof.finalize APIs cannot be called between the acl.prof.model_subscribe and acl.prof.model_unsubscribe APIs of Profiling Data Collection APIs.
API Constraints
- API call requirements
- The acl.prof.model_subscribe API is called before model execution. If the acl.prof.model_subscribe API is called during model execution, the data collected by Profiling is the data after the acl.prof.model_subscribe API is called, which may cause data incompleteness.
- acl.prof.model_subscribe must be used together with acl.prof.model_unsubscribe. Before acl.prof.model_unsubscribe is called, acl.prof.model_subscribe cannot be called repeatedly to subscribe to the same model.
- It is not allowed to pass a non-existent model ID to the acl.prof.model_subscribe call.
- It is not allowed to pass a non-existent or unsubscribed model ID to the acl.prof.model_unsubscribe call.
- If multiple models are loaded to the same device, the subscription configurations delivered to the models are the same.
- API call sequence
- Recommendation
Model loading --> acl.prof.model_subscribe --> acl.prof.get_op_desc_size --> acl.prof.get_op_num --> acl.prof.get_op_type/acl.prof.get_op_name/acl.prof.get_op_start/acl.prof.get_op_end/acl.prof.get_op_duration/acl.prof.get_model_id --> acl.prof.model_unsubscribe
- The following is an example of an incorrect call sequence. In this example, the same model is repeatedly subscribed:
Model 1 loading --> acl.prof.model_subscribe (specifying model 1) --> acl.prof.model_subscribe (specifying model 1) --> acl.prof.model_unsubscribe
- Recommendation
Parent topic: Subscribing to Operator Information