Function: init_dump

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

Initializes dump.

Prototype

  • C Prototype

    aclError aclmdlInitDump()
    
  • Python Function

    ret = acl.mdl.init_dump()
    

Parameters

None

Return Values

Return Value Description
ret Int, error code. If 0 is returned, the operation is successful. If other values are returned, the operation fails.

Constraints

  • acl.mdl.init_dump must be used in pair with acl.mdl.set_dump and acl.mdl.finalize_dump to dump data to files. These APIs can be called for multiple times in a single process to obtain dump data of different Dump configurations.

  • Example scenario:

  • When setting model dump, single-operator dump, and overflow operator dump, if you have called acl.init to set the dump, a failure message is returned when acl.mdl.init_dump is called.

  • acl.mdl.init_dump must be called after acl.init and before the model loading API.

Reference

acl.init is also available. During initialization, the dump configuration is passed through a JSON file to dump the data at runtime. In this mode, acl.init can be called only once in a process. You can modify the dump configuration in the JSON file.