How Do I View a Dump File?
Dump files cannot be viewed with a text tool. Therefore, you need to convert your dump file into a NumPy file and save the NumPy file as a text file using numpy.savetxt.
- Log in to the development environment as the installation user.
- Go to the /home/HwHiAiUser/Ascend/ascend-toolkit/latest/toolkit/tools/operator_cmp/compare directory.
- Run the msaccucmp.pyc script to convert the dump file into a NumPy file. The following is an example:
python3.7.5 msaccucmp.pyc convert -d /home/HwHiAiUser/dump -out /home/HwHiAiUser/dumptonumpy
For details about the parameters of the msaccucmp.pyc script, see How Do I Convert the Format of a Dump File?.
- Use Python to save the NumPy data into a text file. The following is an example:
$ python3.7.5
Python 3.7.5 (default, Mar 5 2020, 16:07:54)[GCC 5.4.0 20160609] on linuxType "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> a = np.load("/home/HwHiAiUser/dumptonumpy/Pooling.pool1.1147.1589195081588018.output.0.npy")
>>> b = a.flatten()
>>> np.savetxt("/home/HwHiAiUser/dumptonumpy/Pooling.pool1.1147.1589195081588018.output.0.txt", b)
The dimension information and Dtype no longer exist in the .txt file. For details, visit the NumPy website.