CANN版本:Ascend-cann-toolkit_6.3.RC1_linux-aarch64.run
torch版本:torch-1.8.1-cp37-cp37m-linux_aarch64.whl
torch_npu版本:torch_npu-1.8.1.post1-cp37-cp37m-linux_aarch64.whl
安装完后print(torch_npu.npu.is_available()),显示True
但是在运行
a=torch.ones(3,4).npu()
print(a+a)
出现以下问题,如何解决?
Traceback (most recent call last):
File "run.py", line 7, in <module>
a=torch.ones(3,4).npu()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/utils/device_guard.py", line 38, in wrapper
return func(*args, **kwargs)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/utils/tensor_methods.py", line 66, in _npu
return torch_npu._C.npu(self, *args, **kwargs)
RuntimeError: Initialize:/usr1/workspace/FPTA_Daily_Plugin_open_v1.8.1-5.0.rc1/CODE/torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.cpp:113 NPU error, error code is 507033
E39999: Inner Error!
E39999 TsdOpen failed. devId=0, tdt error=34[FUNC:startAicpuExecutor][FILE:runtime.cc][LINE:1673]
TraceBack (most recent call last):
Start aicpu executor failed, retCode=0x7020009 devId=0[FUNC:DeviceRetain][FILE:runtime.cc][LINE:2138]
Check param failed, dev can not be NULL![FUNC:PrimaryContextRetain][FILE:runtime.cc][LINE:1991]
Check param failed, ctx can not be NULL![FUNC:PrimaryContextRetain][FILE:runtime.cc][LINE:2018]
Check param failed, context can not be null.[FUNC:NewDevice][FILE:api_impl.cc][LINE:1434]
New device failed, retCode=0x7010006[FUNC:SetDevice][FILE:api_impl.cc][LINE:1455]
rtSetDevice execute failed, reason=[device retain error][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:49]
open device 0 failed, runtime result = 507033.[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161]
Check param failed, dev can not be NULL![FUNC:DeviceRetain][FILE:runtime.cc][LINE:2178]
ctx is NULL![FUNC:GetDevErrMsg][FILE:api_impl.cc][LINE:3680]
rtGetDevMsg execute failed, reason=[context pointer null][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:49]
CANN版本:Ascend-cann-toolkit_6.3.RC1_linux-aarch64.run
torch版本:torch-1.8.1-cp37-cp37m-linux_aarch64.whl
torch_npu版本:torch_npu-1.8.1.post1-cp37-cp37m-linux_aarch64.whl
安装完后print(torch_npu.npu.is_available()),显示True
但是在运行
a=torch.ones(3,4).npu()
print(a+a)
出现以下问题,如何解决?
Traceback (most recent call last):
File "run.py", line 7, in <module>
a=torch.ones(3,4).npu()
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/utils/device_guard.py", line 38, in wrapper
return func(*args, **kwargs)
File "/usr/local/python3.7.5/lib/python3.7/site-packages/torch_npu/utils/tensor_methods.py", line 66, in _npu
return torch_npu._C.npu(self, *args, **kwargs)
RuntimeError: Initialize:/usr1/workspace/FPTA_Daily_Plugin_open_v1.8.1-5.0.rc1/CODE/torch_npu/csrc/core/npu/sys_ctrl/npu_sys_ctrl.cpp:113 NPU error, error code is 507033
E39999: Inner Error!
E39999 TsdOpen failed. devId=0, tdt error=34[FUNC:startAicpuExecutor][FILE:runtime.cc][LINE:1673]
TraceBack (most recent call last):
Start aicpu executor failed, retCode=0x7020009 devId=0[FUNC:DeviceRetain][FILE:runtime.cc][LINE:2138]
Check param failed, dev can not be NULL![FUNC:PrimaryContextRetain][FILE:runtime.cc][LINE:1991]
Check param failed, ctx can not be NULL![FUNC:PrimaryContextRetain][FILE:runtime.cc][LINE:2018]
Check param failed, context can not be null.[FUNC:NewDevice][FILE:api_impl.cc][LINE:1434]
New device failed, retCode=0x7010006[FUNC:SetDevice][FILE:api_impl.cc][LINE:1455]
rtSetDevice execute failed, reason=[device retain error][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:49]
open device 0 failed, runtime result = 507033.[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161]
Check param failed, dev can not be NULL![FUNC:DeviceRetain][FILE:runtime.cc][LINE:2178]
ctx is NULL![FUNC:GetDevErrMsg][FILE:api_impl.cc][LINE:3680]
rtGetDevMsg execute failed, reason=[context pointer null][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:49]