转换Dump文件数据类型
产品支持情况
产品 |
是否支持 |
|---|---|
Atlas 350 加速卡 |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
命令格式
python3 msaicerr.py -d path1 -out path2 -dtype int8
参数说明
- -d或--data:必选参数,指定*.bin格式的Dump文件路径,包含文件名。
- -out或--output_path:可选参数,指定.npy结果文件的存放路径,如果不指定,则结果文件默认跟Dump文件存放在同一路径下。
- -dtype或--dest_dtype:必选参数,指定待转换Dump文件中的数据类型。如果指定的数据类型与源Dump文件中的数据类型不一致,则执行解析命令时,会给出Warning提示,并按用户指定的数据类型解析。
取值范围:float32, float16, float64, int8, int16, int32, int64, uint8, uint16, uint32, uint64, bool, bfloat16
使用示例和输出说明
python3 msaicerr.py -d /demo/extra-info/data-dump/0/exception_info.2.1.20250611171538370.input.0.bin -dtype int8
输出示例如下:
[INFO] The dump file directory will be used to as the output directory of the parsed results. [INFO] Success convert bin to npy: /demo/extra-info/data-dump/0/exception_info.2.1.20250611171538370.input.0.bin -> /demo/extra-info/data-dump/0/exception_info.2.1.20250611171538370.input.0.int8.npy
根据提示,获取转换结果文件。
在执行msaicerr.py工具后,在执行msaicerr.py工具的同级目录下,会生成debug_info.txt文件,用于记录工具执行过程中的日志信息。
父主题: msaicerr工具使用指导