msptiEnableCallback
Applicability
Product |
Supported (Yes/No) |
|---|---|
Atlas A3 Training Series Product |
Yes |
Atlas A2 Training Series Product/Atlas 800I A2 Inference Product |
Yes |
Atlas 200/500 A2 Inference Product |
Yes |
Atlas Inference Series Product |
x |
Atlas Training Series Product |
x |
Function Description
Enables or disables callbacks for subscribers of specific domain and CallbackId.
When the event is triggered at the location of CallbackId, MSPTI calls the callback function registered through the msptiSubscribe API.
Prototype
1 | msptiResult msptiEnableCallback(uint32_t enable, msptiSubscriberHandle subscriber, msptiCallbackDomain domain, msptiCallbackId cbid) |
Options
Option |
Input/Output |
Description |
|---|---|---|
enable |
Input |
Callback switch. If this parameter is set, the callback function is enabled. If this parameter is not set, the callback function is disabled. |
subscriber |
Input |
Handle to the subscriber |
domain |
Input |
Component. Only runtime is supported. |
cbid |
Input |
Callback ID, which identifies the call point of the domain. You can call msptiCallbackIdRuntime and msptiCallbackIdHccl. |
Return Value
If MSPTI_SUCCESS is returned, the operation is successful. If MSPTI_ERROR_INVALID_PARAMETER is returned when the user, domain, or * cbid is invalid, the operation fails.