已在CANN运行环境上安装Toolkit软件包。详细安装请参见《CANN 软件安装指南》。
已配置CANN基础环境变量,需要以安装时的运行用户登录环境,执行source ${install_path}/set_env.sh命令设置环境变量,其中${install_path}为软件包的安装目录,例如:/usr/local/Ascend/ascend-toolkit。
在使用msaicerr工具前,在“${install_path}/latest/toolkit/tools/msaicerr”目录下获取msaicerr.py。
进入“${Toolkit包安装路径}/tools/msaicerr”目录,根据收集AI Core Error问题信息中收集的信息,执行以下命令提取AI Core Error问题相关的关键信息。以下命令中aic_err_info_timestamp为存放AI Core Error问题信息的目录,请根据实际情况替换。
python3 msaicerr.py -p ${HOME}/aic_err_info_timestamp -out $HOME/result
以上命令示例中,通过-p参数指定存放故障信息的目录,例如此处为${HOME}/aic_err_info_timestamp;通过-out参数指定解析结果文件的存放路径,例如此处为$HOME/result,如果不指定,则解析结果默认存放在执行命令的当前路径下。
注意:不能进入-p参数指定的目录或子目录下执行msaicerr工具,例如此处不能进入到aic_err_info_timestamp目录或其子目录中执行msaicerr工具;-out参数指定的目录也不能为-p参数指定的目录或子目录。否则,会出现工具解析卡住或失败的情况。
另外,可以使用命令python3 msaicerr.py -h,查看具体参数的含义。
执行命令成功后,在执行命令的同级目录下生成“info_{时间戳}/aicerror_{number}_{时间戳}/info.txt”文件以及异常算子测试文件test_single_op.py(该文件仅在有异常算子时才存在)。
用户可以直接通过info.txt文件进行问题分析和定位,重点关注Root cause conclusion处包含的关键信息,如下表所示。若收集AI Core Error问题信息中收集的信息中存在多个AI Core Error问题,则msaicerr工具按日志时间解析第一次出现的AI Core Error问题。
关键信息 |
问题原因 |
典型案例及处理方法 |
---|---|---|
Golden Op run error on your environment. |
环境异常。 |
|
Single op test aicore error, please check op. |
单算子实现异常或编译过程异常。 根据提示信息分析是用户自定义算子,还是cann内置算子。 如果打屏日志中有如下提示,表示工具自动生成了单算子用例脚本,您可以执行该脚本复现单算子问题,根据提示排查问题,如果复现不了问题或者排查不出问题,请联系技术支持。您可以获取日志后单击Link联系技术支持。 Run 'export PYTHONPATH=/usr/local/Ascend/CANN-7.3/tools/msaicerr/:$PYTHONPATH;cd /usr/local/Ascend/CANN-7.3/tools/msaicerr;python3 /home/xxxxxxx/xxx/info_xxxx/aicerror_xxxx/test_single_op.py' can test op! |
|
Atomic accumulation exception |
由于精度问题导致溢出。 |
|
The addr of input/output is used but not alloc |
算子输入输出数据地址异常。 |
|
The args of op is different before and after execute |
算子输入输出参数异常。 |
|
Dump data failed in exception dump! Address of input or output is error! |
框架分配内存问题,此时需要区分是GE或其它框架,联系技术支持。您可以获取日志后单击Link联系技术支持。 |
|
The number of AI Cores in the environment is less than that required by the operator. |
环境中的AI Core数量比算子所需的AI Core数量少。 |
请检查使用msaicerr工具的环境与真实出错环境的AI Core数量是否一致,若一致,再联系技术支持处理。您可以获取日志后单击Link联系技术支持。 |
The memset or atomic_clean operator is not inserted before this operator in the graph, while memory cleanup is required before operator execution. |
构图异常。 |
联系技术支持处理。您可以获取日志后单击Link联系技术支持。 |
The set_flag and wait_flag instructions are not used together in the operator code. |
set_flag和wait_flag指令不匹配。 |
CANN内置算子联系技术支持处理。您可以获取日志后单击Link联系技术支持。 自定义算子用户需自行排查算子代码。 |
There's no obvious known error, so I can't determine what the error is. |
msaicerr工具执行成功,但没有解析出来故障。 |
联系技术支持处理。您可以获取日志后单击Link联系技术支持。 |