问题描述

HwHiAiUser@dcn:tmp$ pip3 install https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.3.1/MindSpore/unified/aarch64/mindspore-2.3.1-cp38-cp38-linux_aarch64.whl --trusted-host ms-release.obs.cn-north-4.myhuaweicloud.com -i https://pypi.tuna.tsinghua.edu.cn/simple 

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple 

Collecting mindspore==2.3.1 

/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ms-release.obs.cn-north-4.myhuaweicloud.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings 

  Downloading https://ms-release.obs.cn-north-4.myhuaweicloud.com/2.3.1/MindSpore/unified/aarch64/mindspore-2.3.1-cp38-cp38-linux_aarch64.whl (328.9 MB) 

     |████████████████████████████████| 328.9 MB 9.8 MB/s 

Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.8/dist-packages (from mindspore==2.3.1) (10.4.0) 

Collecting astunparse>=1.6.3 

  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/2b/03/13dde6512ad7b4557eb792fbcf0c653af6076b81e5941d36ec61f7ce6028/astunparse-1.6.3-py2.py3-none-any.whl (12 kB) 

Requirement already satisfied: scipy>=1.5.4 in /usr/local/lib/python3.8/dist-packages (from mindspore==2.3.1) (1.10.1) 

Requirement already satisfied: psutil>=5.6.1 in /usr/local/lib/python3.8/dist-packages (from mindspore==2.3.1) (6.0.0) 

Requirement already satisfied: asttokens>=2.0.4 in /usr/local/lib/python3.8/dist-packages (from mindspore==2.3.1) (2.4.1) 

Requirement already satisfied: numpy<2.0.0,>=1.20.0 in /usr/local/lib/python3.8/dist-packages (from mindspore==2.3.1) (1.24.4) 

Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.8/dist-packages (from mindspore==2.3.1) (24.1) 

Requirement already satisfied: protobuf>=3.13.0 in /usr/local/lib/python3.8/dist-packages (from mindspore==2.3.1) (5.27.3) 

Requirement already satisfied: wheel<1.0,>=0.23.0 in /usr/lib/python3/dist-packages (from astunparse>=1.6.3->mindspore==2.3.1) (0.34.2) 

Requirement already satisfied: six<2.0,>=1.6.1 in /usr/lib/python3/dist-packages (from astunparse>=1.6.3->mindspore==2.3.1) (1.14.0) 

Installing collected packages: astunparse, mindspore 

  WARNING: The scripts cache_admin and msrun are installed in '/home/HwHiAiUser/.local/bin' which is not on PATH. 

  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. 

Successfully installed astunparse-1.6.3 mindspore-2.3.1 

HwHiAiUser@dcn:tmp$ python3 -c "import mindspore;mindspore.set_context(device_target='Ascend');mindspore.run_check()" 

/usr/local/lib/python3.8/dist-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]) 

/usr/local/lib/python3.8/dist-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) 

/usr/local/lib/python3.8/dist-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]) 

/usr/local/lib/python3.8/dist-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) 

MindSpore version:  2.3.1 

MindSpore running check failed. 

Call aclnnMul failed, detail:EZ9999: Inner Error! 

EZ9999: 2024-08-30-03:12:01.660.636  Parse dynamic kernel config fail.[THREAD:2058402] 

        TraceBack (most recent call last): 

        AclOpKernelInit failed opType[THREAD:2058402] 

        Op Mul does not has any binary.[THREAD:2058403] 

        Kernel Run failed. opType: 3, Mul[THREAD:2058403] 

        launch failed for Mul, errno:561000.[THREAD:2058403] 

 

---------------------------------------------------- 

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

---------------------------------------------------- 

mindspore/ccsrc/plugin/device/ascend/kernel/pyboost/auto_generate/mul.cc:53 operator() 

解决方案

这个错误应该是昇腾环境没安装好的原因,可以确认下mindspore2.3.1对应的昇腾固件和驱动版本、以及cann的版本是否匹配,还有cann的环境变量是否完善,还有对应版本的kernels包有没有安装,我这边目前运行mindspore2.3.1的cann版本如下,驱动版本要根据自己具体的芯片型号来选择:

14.png

Logo

昇腾计算产业是基于昇腾系列(HUAWEI Ascend)处理器和基础软件构建的全栈 AI计算基础设施、行业应用及服务,https://devpress.csdn.net/organization/setting/general/146749包括昇腾系列处理器、系列硬件、CANN、AI计算框架、应用使能、开发工具链、管理运维工具、行业应用及服务等全产业链

更多推荐