Reinstalled CUDA Version Does Not Match the One in the Target Image
Symptom
1. "RuntimeError: cuda runtime error (11) : invalid argument at /pytorch/aten/src/THC/THCCachingHostAllocator.cpp:278" 2. "libcudart.so.9.0 cannot open shared object file no such file or directory" 3. "Make sure the device specification refers to a valid device. The requested device appears to be a GPU,but CUDA is not enabled"
Possible Causes
The CUDA version of the newly installed package does not match the CUDA version in the image.
Solution
- Remotely log in to the selected image and run nvcc -V to obtain the CUDA version of the image.
- Reinstall Torch. Ensure that the version matches the one obtained in the previous step.
Summary and Suggestions
Before creating a training job, use the ModelArts development environment to debug the training code to maximally eliminate errors in code migration.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.