aclmdlSetDump

Description

Sets dump configuration. This API is synchronous.

Restrictions

Prototype

aclError aclmdlSetDump(const char *dumpCfgPath)

Parameters

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.

Configuration File Template

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"                                 
	}      

}

Returns

0 on success; else, failure.

Related APIs

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.