msptiEnableCallback¶
Supported Products¶
[!NOTE]
For details about Ascend product models, see Ascend Product Models.
| Product Type | Supported |
|---|---|
| Ascend 950 products | √ |
| Atlas A3 training products/Atlas A3 inference products | √ |
| Atlas A2 training products/Atlas A2 inference products | √ |
| Atlas 200I/500 A2 inference products | √ |
| Atlas inference products | × |
| Atlas training products | × |
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.
Function Prototype¶
msptiResult msptiEnableCallback(uint32_t enable, msptiSubscriberHandle subscriber, msptiCallbackDomain domain, msptiCallbackId cbid)
Parameter Description¶
Table 1 Parameter Description
callback switch. If this parameter is configured, the callback is enabled. If this parameter is not configured, the callback is disabled. |
||
| . | ||
| . | callback ID, which identifies the calling point of the domain. The msptiCallbackIdRuntime and msptiCallbackIdHccl functions can be called. |
Returns¶
MSPTI_SUCCESS is returned if the operation is successful. MSPTI_ERROR_INVALID_PARAMETER is returned if the user, domain, or cbid is invalid, indicating that the operation fails.