mstxGetToolId
| Product | Supported |
|---|---|
| Ascend 910_95 AI Processors | √ |
| 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 | √ |
Obtains the tool ID that currently intercepts the mstx APIs. The tool ID macro is defined as follows:
Invalid value 0, indicating that no tool has launched the program.
#define MSTX_TOOL_INVALID_ID 0x0
0x1000, indicating that the program is launched by msProf or MSPTI
#define MSTX_TOOL_MSPROF_ID 0x1000
0x1001, indicating that the program is launched by the msProf tool
#define MSTX_TOOL_MSOPPROF_ID 0x1001
0x1002, indicating that the program is launched by the msSanitizer tool
#define MSTX_TOOL_MSSANITIZER_ID 0x1002
0x1003, indicating that the program is launched by the msLeaks Memory Leak Detection Tool
#define MSTX_TOOL_MSLEAKS_ID 0x1003
void mstxGetToolId(uint64 *id)
Table 1 Parameter description
| Parameter | Input/Output | Description |
|---|---|---|
| id | Output | As an output parameter, returns the tool ID that currently intercepts the mstx API. Data Type: uint64 *. |
None
uint64 id;
mstxGetToolId(&id);