Atals 300i (3010) 使用PyTorch NPU Extension,提示不支持的soc版本:RuntimeError: Unsupported soc version: Ascend310
收藏回复举报
Atals 300i (3010) 使用PyTorch NPU Extension,提示不支持的soc版本:RuntimeError: Unsupported soc version: Ascend310
t('forum.solved') 已解决
发表于2025-01-24 17:03:04
0 查看

最小验证脚本:

import torch 
import torch_npu 

torch_npu.npu.set_device("npu:0")

报错信息:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[2], line 1
----> 1 torch_npu.npu.set_device("npu:0") 

File /opt/miniconda3/envs/ascend-pytorch/lib/python3.11/site-packages/torch_npu/npu/utils.py:58, in set_device(device)
     56 device_id = _get_device_index(device, optional=True)
     57 if device_id >= 0:
---> 58     torch_npu._C._npu_setDevice(device_id)

RuntimeError: Unsupported soc version: Ascend310

报错截图:

cke_6071.png

npu-smi info命令结果:

cke_267.png

硬件是Atlas 300i 3010推理卡,CANN、NPU驱动和固件版本如图,已经是最新版本:

cke_50937.png

我要发帖子