Sets dump configuration. This API is synchronous.
Example scenario:
For example, in the following API call sequence, the dump configuration is valid only for model 2.
aclmdlInitDump --> Load model 1 --> aclmdlSetDump -->Load model 2 --> aclmdlFinalizeDump
For example, in the following API call sequence, the dump configuration of the later call overwrites that of the previous call.
aclmdlInitDump --> aclmdlSetDump --> aclmdlSetDump --> Load model 1 --> aclmdlFinalizeDump
aclError aclmdlSetDump(const char *dumpCfgPath)
Parameter |
Input/Output |
Description |
|---|---|---|
dumpCfgPath |
Input |
Pointer to the configuration file path, including the file name. The configuration file is in JSON format. Currently, dump data can be configured. Configuration File Template shows an example. For details about the configuration, see ""Data Preparation > Inference Scenarios > Preparing Dump Data of an Offline Model (AscendCL)" in Model Accuracy Analyzer Instructions. |
Take the Caffe ResNet-50 model as an example. To compare the output results of operator layers in the offline model adapted to the Ascend AI Processor converted from Caffe ResNet-50 and those from the Caffe ResNet-50 model, edit the configuration file as follows.
{
"dump":{
"dump_list":[
{
"model_name":"ResNet-50",
"layer":[
"conv1conv1_relu",
"res2a_branch2ares2a_branch2a_relu",
"res2a_branch1",
"pool1"
]
}
],
"dump_path":"/MyApp20/dump",
"dump_mode":"output"
}
}
0 on success; else, failure.
AscendCL also provides the aclInit API. During AscendCL initialization, the dump configuration is passed as a JSON configuration file to dump the app data at run time. In this mode, aclInit can be called only once in a process. To change the dump configuration, modify the in the JSON configuration file.