aclmdlRIDebugJsonPrint

Applicable Products

Product

Supported

Ascend 950PR / Ascend 950DT

√

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

☓

Function

Exports the model running instance information to a file in JSON format in maintenance and test scenarios. The instance information includes the model ID, stream ID, task ID, and task type. Then, you can view the visualized model information in tracing mode (for example, chrome://tracing/).

Prototype

1
aclError aclmdlRIDebugJsonPrint(aclmdlRI modelRI, const char *path, uint32_t flags)

Parameters

Parameter

Input/Output

Description

modelRI

Input

Running instance of the model that is used to temporarily store the captured tasks. For details about the type definition, see aclmdlRI.

Ensure that the value of modelRI is valid.

path

Input

Path of the file to export to. The path includes the file name.

Ensure that the file path exists and you have read and write permissions on it. Otherwise, this API returns a failure message.

flags

Input

Configuration options.

The options include the following macros:

  • ACL_MDLRI_DEBUG_JSON_PRINT_SUMMARY: prints the basic modelRI information, such as the model ID, stream ID, and task ID.
  • ACL_MDLRI_DEBUG_JSON_PRINT_VERBOSE: In addition to the basic information, the kernel function parameter information of the AI Core operator in modelRI is also printed.

The macros are defined as follows:

#define ACL_MDLRI_DEBUG_JSON_PRINT_SUMMARY 0x0UL
#define ACL_MDLRI_DEBUG_JSON_PRINT_VERBOSE 0x1UL

Returns

0 on success; otherwise, failure. For details, see aclError.

API Call Example

For the API call example, see Single-Stream Capture.