---
title: 转换Dump文件数据类型
description: "转换*.bin格式的Dump文件中的数据类型。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/troubleshooting/troubleshooting_0533.html
sourcePath: /source/zh/canncommercial/900/maintenref/troubleshooting/troubleshooting_0533.html
indexId: 6a7fc3d2cbf363858b0fc23dfe5aa8af5e8d0b40333d651ef6ea6fc437252d3882
---
# 转换Dump文件数据类型

#### 功能说明

转换*.bin格式的Dump文件中的数据类型。

*.bin格式的Dump文件可从解析Dump文件中获取。


#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 命令格式

```
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文件，用于记录工具执行过程中的日志信息。
