Overview
General Restrictions
The APIs in this section cannot be called together with Profiling AscendCL API (Collecting and Flushing Profile Data). That is, aclprofInit, aclprofStart, aclprofStop, and aclprofFinalize cannot be called between aclprofModelSubscribe and aclprofModelUnSubscribe.
API Constraints
- API call requirements
- Call aclprofModelSubscribe before the model is executed. If aclprofModelSubscribe is called during model execution, only profile data after the aclprofModelSubscribe call is collected, which may be incomplete.
- aclprofModelSubscribe must be used in pair with aclprofModelUnSubscribe. Before aclprofModelUnSubscribe is called,
do not repeatedly call aclprofModelSubscribe.
- It is not allowed to pass a non-existent model ID to the aclprofModelSubscribe call.
- It is not allowed to pass a non-existent or unsubscribed model ID to the aclprofModelUnSubscribe 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 --> aclprofModelSubscribe --> aclprofGetOpDescSize --> aclprofGetOpNum --> aclprofGetOpType/aclprofGetOpName/aclprofGetOpStart/aclprofGetOpEnd/aclprofGetOpDuration/aclprofGetModelId --> aclprofModelUnSubscribe
- The following is an example of an incorrect call sequence. In this example, the same model is repeatedly subscribed.
Load model 1 --> aclprofModelSubscribe (specify model 1) --> aclprofModelSubscribe (specify model 1) --> aclprofModelUnSubscribe
- Recommendation