Overview
General Restrictions
The APIs in this section cannot be called with Data Profiling APIs together. acl.prof.init, acl.prof.start, acl.prof.stop, and acl.prof.finalize cannot be called between acl.prof.model_subscribe and acl.prof.model_unsubscribe.
API Constraints
- API call requirements
- Call acl.prof.model_subscribe before the model is executed. If acl.prof.model_subscribe is called during model execution, only profile data after the acl.prof.model_subscribe call is collected, which may be incomplete.
- 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
Load a model --> 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:
Load model 1 --> acl.prof.model_subscribe (specify model 1) --> acl.prof.model_subscribe (specify model 1) --> acl.prof.model_unsubscribe
- Recommendation
Parent topic: Subscription to Operator Information