Function: init_dump
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Initializes the dump.
Prototype
- C Prototype
1aclError aclmdlInitDump()
- Python Function
1ret = acl.mdl.init_dump()
Parameters
None
Return Value
Return Value |
Description |
|---|---|
ret |
Int, error code. 0 on success; else, failure. |
Restrictions
- 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:
- To execute two models, you need to set dump information differently. The API call sequence is as follows: acl.init --> acl.mdl.init_dump --> acl.mdl.set_dump --> Model loading --> Model execution --> acl.mdl.finalize_dump --> Model unloading -> acl.mdl.init_dump -> acl.mdl.set_dump -> Model loading -> Model execution -> acl.mdl.finalize_dump -> Model unloading -> Other tasks -> acl.finalize
- To execute the same model twice, you only need to perform the dump operation for the first execution. The API call sequence is as follows: acl.init --> acl.mdl.init_dump --> acl.mdl.set_dump --> Model loading --> Model execution --> acl.mdl.finalize_dump --> Model unloading --> Model loading --> Model execution --> Other tasks --> acl.finalize
- For the model dump configuration, single-operator dump configuration, and overflow/underflow operator dump configuration, if the dump information has been configured by calling acl.init, a failure message is returned when acl.mdl.init_dump is called.
The acl.mdl.init_dump API must be called after the acl.init API is called and before the model loading API is called.
Reference
In addition, the acl.init API is provided. During initialization, the dump configuration information is transferred through the *.json file. After the application is run, the dump data is obtained. In this mode, the acl.init API can be called only once in a process. To modify the dump configuration, modify the configuration in the *.json file.