acldumpRegCallback
Description
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.
aclInit --> aclmdlInitDump --> acldumpRegCallback --> model loading --> model execution --> acldumpUnregCallback --> aclmdlFinalizeDump --> model unloading --> aclFinalize
- 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 acldumpRegCallback API is called, the data storage will not take effect, and the dump data obtained by the callback function will be used.
aclInit --> acldumpRegCallback --> model loading --> model execution --> acldumpUnregCallback --> model unloading --> aclFinalize
- 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 acldumpUnregCallback, you can obtain the dump data of both models through the callback function.
aclInit --> aclmdlInitDump --> acldumpRegCallback --> model 1 loading --> model 1 execution -->--> model 2 loading --> model 2 execution --> acldumpUnregCallback --> aclmdlFinalizeDump --> model unloading --> aclFinalize
Prototype
aclError acldumpRegCallback(int32_t (* const messageCallback)(const acldumpChunk *, int32_t len), int32_t flag)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
messageCallback |
Input |
Pointer to the callback function, which is used to receive callback data.
|
flag |
Input |
Whether to write dump data to a drive after the callback API is called.
|
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.