Function: finalize_dump
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Deinitializes dump.
Prototype
- C Prototype
1aclError aclmdlFinalizeDump()
- Python Function
1ret = acl.mdl.finalize_dump()
Parameter Description
None.
Return Value Description
Return Value |
Description |
|---|---|
ret |
Int, error code: 0 on success; else, failure. |
Restrictions
- acl.mdl.init_dump needs to be called in conjunction 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 --> execution of 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 --> execution of other tasks --> acl.finalize
Reference
The acl.init API is also provided. During initialization, the dump configuration is passed as a JSON configuration file to dump the app data at run time. In this mode, the acl.init API can be called only once in a process. To modify the dump configuration, you need to modify the configuration in the JSON file.
Parent topic: Model Execution