msaicerr-toolkit

Analyze AI Core Error faults and parse dump files on Ascend NPU environments.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill msaicerr-toolkit-wangwindow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: msaicerr-toolkit
Source: https://github.com/WangWindow/CANN-BatchMatMulMaxsum/tree/main/.agents/skills/msaicerr-toolkit
Command: npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill msaicerr-toolkit-wangwindow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? When training or inference jobs on Ascend NPU fail with "there is an aicore error" or "aivec error", developers struggle to locate the root cause from raw logs and binary dump files. This Skill guides the use of the msaicerr tool shipped with the CANN Toolkit to analyze fault information, parse dump files into readable .bin/.npy data, and verify the software and hardware environment. ## Core Features & Use Cases - AI Core Error Analysis: Run msaicerr.py with -p on a collected fault information directory to generate an info.txt report that helps locate the failing operator, with guidance on required inputs (dump files, .o/.json compile artifacts, cann logs). - Dump File Parsing and Conversion: Parse dump files into .bin/.npy files containing operator inputs, outputs, and workspace data, and convert .bin files to .npy with a specified dtype such as int8 or bfloat16. - Environment Verification: Run a built-in sample operator with -e to check whether the software and hardware environment is healthy before deeper analysis. - Use Case: A training job crashes with an aicore error. You collect the fault information directory, run the preflight check, then execute msaicerr.py -p to get info.txt, and finally parse the dump file to inspect the failing operator's actual input and output values. ## Quick Start Ask the assistant to analyze an AI Core Error by running msaicerr with the -p option on your fault information directory and reading the generated info.txt.

Frequently Asked Questions about msaicerr-toolkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze an AI Core Error with msaicerr?

Run python3 msaicerr.py -p <fault info directory> -out <result directory> from the {install_path}/tools/msaicerr directory. The -p parameter is required, and the terminal output points to an info.txt file that guides problem localization.

How to parse Ascend dump files to view operator inputs and outputs?

Run python3 msaicerr.py -d <dump file path> including the file name. The tool parses the dump file into .bin or .npy files recording operator inputs, outputs, and workspace data, saved alongside the dump file unless -out specifies another path.

Why does msaicerr hang or fail during analysis?

The most common cause is path relationships: you must not execute the tool inside the -p directory or its subdirectories, and -out cannot be inside -p either. Run from {install_path}/tools/msaicerr with -p and -out pointing to independent paths.

Can msaicerr analyze MatmulAllReduce operator errors?

No. msaicerr does not support AI Core Error analysis for MatmulAllReduce class operators, AllGatherMatmul, MatmulReduceScatter, GroupedMatmulAllReduce, MemSet, and NonMaxSuppressionBucketize. These require alternative debugging approaches.

Can I copy fault logs to another machine for msaicerr analysis?

No. msaicerr only supports local analysis, meaning the tool must run in the same runtime environment where the logs were produced. It runs a built-in sample operator and depends on the local CANN environment, so cross-machine analysis is unsupported.

How to fix 'Can not read with dtype bfloat16' in debug_info.txt?

This message means the tool encountered a data type it cannot recognize. Install the corresponding third-party library yourself; for bfloat16, install the bfloat16ext library and retry the parsing or conversion command.