Manually Collecting Operator Compilation Information (.o and .json Files)

Search for the operator .json and .o files in the CANN software installation path, which is /usr/local/Ascend/cann by default. If no file is found, search for them in the cache directory, which is ${HOME}/atc_data by default. If the ASCEND_CACHE_PATH environment variable is configured, search for the files in the path specified by this environment variable. For details about the environment variables and their restrictions, see Environment Variables.

When searching for the operator .json file, use the kernel name as the keyword. If the kernel name contains _mix_aic or _mix_aiv, delete them during the search. For example, if the kernel name is xxx_mix_aic_kernel0, use xxx_kernel0 as the keyword. If the kernel name is xxx_tilingkey_mix_aic, use xxx_tilingkey as the keyword. Search for the file in the /usr/local/Ascend/cann directory. The following is a command example:

# Delete _mix_aic or _mix_aiv. Replace xxxxxx with the actual kernel name.
kernel_name=xxxxxx
kernel_name=$(echo $kernel_name | sed 's/_mix_aic//g' | sed 's/_mix_aiv//g' )
# Search for the JSON file.
find /usr/local/Ascend/cann -name "*.json"|xargs grep -rn $kernel_name

# Move the .json files to the aic_err_info directory.
cp  xxxxxx.json aic_err_info/

When searching for the .o operator file, use the value of the binFileName field (name of the .o file) in the .json operator file as the keyword. Search for the file in the /usr/local/Ascend/cann directory. The following is a command example:

# Locate the binFileName: xxxxxx in the JSON file to get the .o file name.
find /usr/local/Ascend/cann -name xxxxxx.o

# Move the .o files to the aic_err_info directory.
cp  xxxxxx.o aic_err_info/