Function: dump_reg_callback
Applicability
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function Usage
Registers the dump data callback function.
- Execute a model and obtain dump data through callback.
The following two methods are supported:
- Disable model and single-operator dump configurations at the aclInit API.
Function: init --> Function: init_dump --> Function: dump_reg_callback -> Model loading -> Model execution -> Function: dump_unreg_callback --> Function: finalize_dump -> Model unloading -> Function: finalize
- Enable model and single-operator dump configurations at the aclInit API. In this case, you need to configure the data storage path. However, if the Function: dump_reg_callback API is called, the data storage will not take effect, and the dump data obtained by the callback function will be used.
Function: init -->Function: dump_reg_callback -> Model loading -> Model execution -> Function: dump_unreg_callback -> Model unloading -> Function: finalize
- Disable model and single-operator dump configurations at the aclInit API.
- Execute two different models and obtain dump data through callback. In this context, as long as the callback function is not deregistered by calling Function: dump_unreg_callback, you can obtain the dump data of both models through the callback function.
Function: init --> Function: init_dump --> Function: dump_reg_callback --> Model 1 loading --> Model 1 execution --> --> Model 2 loading --> Model 2 execution --> Function: dump_unreg_callback --> Function: finalize_dump --> Model unloading --> Function: finalize
Prototype
- C Prototype
1aclError acldumpRegCallback(int32_t (* const messageCallback)(const acldumpChunk *, int32_t len), int32_t flag)
- Python Function
1ret = acl.mdl.dump_reg_callback(mdl_dump_callback, flag)
Parameter Description
Parameter |
Description |
|---|---|
mdl_dump_callback |
Callback function used to receive callback data. It has the following parameters:
|
flag |
Int, whether to write dump data to a drive after the callback API is called.
|
Return Value Description
Return Value |
Description |
|---|---|
ret |
Int, error code: 0 on success; else, failure. |
Restrictions
None.