msptiSubscribe¶
Supported Products¶
Note: For details about Ascend product models, see Ascend Product Models.
| Product Type | Supported |
|---|---|
| Ascend 950 products | √ |
| Atlas A3 training series/Atlas A3 inference series | √ |
| Atlas A2 training series/Atlas A2 inference series | √ |
| Atlas 200I/500 A2 inference products | √ |
| Atlas inference series | × |
| Atlas training series products | × |
Description ¶
Registers callback functions with MSPTI. A user (subscriber) needs to call this API before calling the MSPTI APIs. Only one subscriber is supported at a time.
Function Prototype¶
msptiResult msptiSubscribe(msptiSubscriberHandle *subscriber, msptiCallbackFunc callback, void *userdata)
Parameter Description¶
Table 1 Command-line options
Handle address of the User-defined data address of the| . | ||
| . | ||
subscriber. The subscriber data is transferred to the callback function through this parameter. |
Return Values¶
MSPTI_SUCCESS indicates that the initialization is successful. MSPTI_ERROR_INNER is returned if the MSPTI cannot be initialized, MSPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED is returned if there are already MSPTI subscribers, or MSPTI_ERROR_INVALID_PARAMETER is returned if the subscriber is empty. In this case, the initialization fails.