Function: start_dump_args

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

Atlas inference product

x

Atlas 200I/500 A2 inference product

x

Function Usage

Enables the operator statistics function. This API must be paired with Function: stop_dump_args to export the operator information files to the directory specified by path. One shape corresponds to one operator information file, which contains the operator type, operator attributes, and operator input and output information such as format, data type, and shape.

Application scenario: For example, if you want to collect statistics on the operators involved in the execution of a model, you can call the acl.op.start_dump_args API before the model execution and call the acl.op.stop_dump_args API after the model execution. After the successful acl.op.start_dump_args call, an operator information file for each operator shape is generated in the directory specified by path.

Prototype

  • C Prototype
    1
    aclError aclopStartDumpArgs(uint32_t dumpType, const char *path)
    
  • Python Function
    1
    ret = acl.op.start_dump_args(dump_type, path)
    

Parameters

Parameter

Description

dumpType

Int, type of dump information.

Currently, only ACL_OP_DUMP_OP_AICORE_ARGS is supported, indicating that information about all operators is collected.

ACL_OP_DUMP_OP_AICORE_ARGS = 0x00000001

path

Str, path for storing dump files. The path can be an absolute path or a relative path (relative to the directory where the executable file of the application is located). Ensure that the path exists or can be created.

Returns

Return Value

Description

ret

Int, error code: 0 on success; else, failure.

Restrictions

This API can be used only in the single-operator API execution scenario. Otherwise, dump files cannot be generated.

The Atlas inference product does not support this API.

The Atlas 200I/500 A2 inference product does not support this API.

The Atlas training product does not support this API.

The Atlas A2 training product/Atlas A2 inference product does not support this API.