【debug】【联合编译】No CUDA runtime is found, using CUDA_HOME=‘/usr/local/cuda-10.0‘
Error:No CUDA runtime is found, using CUDA_HOME=‘/usr/local/cuda-10.0‘错误原因:cuda安装问题&显卡驱动问题建议分步骤测试完成后再进行下一步。没安装成功或者没有配置路径。需要重新配置nvcc -Vnvidia-smi如果是多版本cuda,需要手动切换cuda的home位置到对应版本。Torch版本问题Torch和Tor
·
Error:
No CUDA runtime is found, using CUDA_HOME=‘/usr/local/cuda-10.0‘
错误原因:
cuda安装问题&显卡驱动问题
建议分步骤测试完成后再进行下一步。
没安装成功或者没有配置路径。
需要重新配置
nvcc -V
nvidia-smi
如果是多版本cuda,需要手动切换cuda的home位置到对应版本。
Torch版本问题
Torch和TorchVision需要与CUDA版本对应。如果你安装时候后没注意这个问题,就需要仔细检查一下
conda list
pip list
pip3 list
根据查询结果,使用install覆盖安装指定版本torch
编译器环境问题
如果是编译,需要由CPP环境,比如VS的c++、gcc等。
此问题一般出现在初始化、配置网络的setup中。
reference
https://github.com/pytorch/pytorch/issues/22844
Multiple versions of CUDA are installed in a shared server. CUDA9 in /usr/local/cuda-9.0 linked to /usr/local/cuda; CUDA10 in /usr/local/cuda-10.0; and a newer CUDA10 in ~/.local/cuda-10.0.
The environment variables including PATH, CPATH, LD_LIBRARY_PATH are all assigned to the newer CUDA10 i.e. ~/.local/cuda-10.0. CUDA_HOME is not set.
While installing pytorch, it automatically learns to use the newer CUDA10 by calling tools.setup_helpers.cuda.CUDA_HOME, which calls which(nvcc).
The bug showed up while installing torch_scatter. That project utilizes the torch.utils.cpp_extension.CUDA_HOME to identify the cuda path in setup.py, which then results in a different cuda path from the one utilized for installing pytorch.
Typically, in the above server, here are the sample output:
$ python -c "from torch.utils.cpp_extension import CUDA_HOME; print(CUDA_HOME)"
/usr/local/cuda
$ cd pytorch && python -c "from tools.setup_helpers.cuda import CUDA_HOME; print(CUDA_HOME)"
/home/haotang/.local/cuda-10.0
更多推荐
已为社区贡献1条内容
所有评论(0)