RuntimeError CUDA error invalid device ordinalCUDA kernel errors might be asynchronously reported at some other API callso the stacktrace below might be incorrectFor debugging consider passing CUDA_LA
This error message indicates that there is an issue with the CUDA device ordinal, which is the index of the GPU device being used. It is likely that the ordinal provided is invalid, meaning it does not correspond to a valid GPU device on the system.
To resolve this issue, you can try the following steps:
-
Check the GPU device ordinal being used in your code and ensure that it corresponds to a valid GPU device on the system.
-
Check that the CUDA toolkit and drivers are correctly installed and configured on the system.
-
Consider setting the environment variable CUDA_LAUNCH_BLOCKING=1, which will cause CUDA kernel errors to be reported synchronously, making it easier to debug the issue.
-
If the issue persists, try updating the CUDA toolkit and drivers to the latest version.
-
If none of the above steps work, consider seeking help from the NVIDIA developer forums or support team
原文地址: https://www.cveoy.top/t/topic/co29 著作权归作者所有。请勿转载和采集!