mindyolo icon indicating copy to clipboard operation
mindyolo copied to clipboard

按照官网流程在华为310P3设备上安装了mindspore,但运行验证程序时报错

Open nap41h opened this issue 11 months ago • 2 comments

1.报错信息如下,我把主要的两个问题用双斜线标出来了,一个warning一个error 2.自查的时候提到了环境配置和版本的问题, 1)版本配置如下: 驱动:Ascend-hdk-310p-npu-driver_23.0.1_linux-aarch64
CANN软件包:toolkit和kernels 是7.0.1.1版本的Ascend-cann-toolkit_7.0.1.1_linux-aarch64和Ascend-cann-kernels-310p_7.0.1.1_linux mindspore:2.2.14
python:3.9.2版本 2)环境变量 根据gpt的建议添加了很多,但是没有什么用,也按照conda自动安装并运行了软件包里的set_env.sh文件,按照官网的建议最后配置了环境变量但没什么用

磨了快一个星期了,还是决定不逞强,来寻求下更厉害的人的帮助 3.报错完整情况如下

1)@ubuntu01:~$ python -c "import mindspore;mindspore.set_context(device_target='Ascend');mindspore.run_check()"

/home/xu_wei_chen/miniconda3/envs/mindspore_py392/lib/python3.9/site-packages/numpy/core/getlimits.py:518: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero. setattr(self, word, getattr(machar, word).flat[0]) /home/xu_wei_chen/miniconda3/envs/mindspore_py392/lib/python3.9/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float64'> type is zero. return self._float_to_str(self.smallest_subnormal) /home/xu_wei_chen/miniconda3/envs/mindspore_py392/lib/python3.9/site-packages/numpy/core/getlimits.py:518: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero. setattr(self, word, getattr(machar, word).flat[0]) /home/xu_wei_chen/miniconda3/envs/mindspore_py392/lib/python3.9/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero. return self._float_to_str(self.smallest_subnormal) 2)/////////////////////////////////////////// warning 1 /////////////////////// [WARNING] ME(131275:281473561825296,MainProcess):2025-01-07-07:55:52.428.276 [mindspore/run_check/_check_version.py:468] Can not find driver so(need by mindspore-ascend). Please check whether the Environment Variable LD_LIBRARY_PATH is set. For details, refer to the installation guidelines: https://www.mindspore.cn/insta

Traceback (most recent call last): File "", line 1, in File "/home/xu_wei_chen/miniconda3/envs/mindspore_py392/lib/python3.9/site-packages/mindspore/_checkparam.py", line 1313, in wrapper return func(*args, **kwargs) File "/home/xu_wei_chen/miniconda3/envs/mindspore_py392/lib/python3.9/site-packages/mindspore/context.py", line 1493, in set_context ctx.set_device_target(kwargs['device_target']) File "/home/xu_wei_chen/miniconda3/envs/mindspore_py392/lib/python3.9/site-packages/mindspore/context.py", line 387, in set_device_target self.set_param(ms_ctx_param.device_target, target) File "/home/xu_wei_chen/miniconda3/envs/mindspore_py392/lib/python3.9/site-packages/mindspore/context.py", line 175, in set_param self._context_handle.set_param(param, value) ///////////////////////////////////////////// error 2 ////////////////////////////// 3)RuntimeError: Unsupported device target Ascend. This process only supports one of the ['CPU']. Please check whether the Ascend environment is installed and configured correctly, and check whether current mindspore wheel package was built with "-e Ascend". For details, please refer to "Device load error message".


  • Device load error message:

Load dynamic library: libmindspore_ascend.so.1 failed.


  • C++ Call Stack: (For framework developers)

mindspore/core/utils/ms_context.cc:361 SetDeviceTargetFromInner

nap41h avatar Jan 07 '25 08:01 nap41h

可以试一试export TE_PARALLEL_COMPILER = 1

291336599 avatar Jan 07 '25 09:01 291336599

我也是遇到同样的问题,我后面升级了 CANN = 8.0.0, mindspore==2.4.10 就可以了

7125messi avatar Jan 21 '25 08:01 7125messi