RuntimeError:
----------------------------------------------------
- Cuda error:
----------------------------------------------------
The cudaGetLastError[100], no CUDA-capable device is detected
----------------------------------------------------
- C++ Call Stack: (For framework developers)
----------------------------------------------------
mindspore/ccsrc/plugin/device/gpu/hal/device/cuda_driver.cc:292 device_count
[ERROR] ME(3463501,4002c8054660,python3.9):2025-02-11-21:30:21.331.164 [mindspore/ccsrc/runtime/hardware/device_context_manager.cc:494] WaitTaskFinishOnDevice] SyncStream failed, exception:
----------------------------------------------------
- Cuda error:
----------------------------------------------------
SetDevice for id:0 failed, ret[100], no CUDA-capable device is detected. Please make sure that the 'device_id' set in context is in the range:[0, total number of GPU). If the environment variable 'CUDA_VISIBLE_DEVICES' is set, the total number of GPU will be the number set in the environment variable 'CUDA_VISIBLE_DEVICES'. For example, if export CUDA_VISIBLE_DEVICES=4,5,6, the 'device_id' can be 0,1,2 at the moment, 'device_id' starts from 0, and 'device_id'=0 means using GPU of number 4.
----------------------------------------------------
- C++ Call Stack: (For framework developers)
----------------------------------------------------
mindspore/ccsrc/plugin/device/gpu/hal/device/cuda_driver.cc:308 SetDevice
解决方法:在提交sh的脚本中CUDA_VISIBLE_DEVICES=1,您使用1卡应该是=0