Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不能寻找到cuda #306

Open
MAGICXQY opened this issue Jul 4, 2024 · 2 comments
Open

不能寻找到cuda #306

MAGICXQY opened this issue Jul 4, 2024 · 2 comments

Comments

@MAGICXQY
Copy link

MAGICXQY commented Jul 4, 2024

CMake Error at cmake/modules/CUDA.cmake:30 (message):
Cannot find CUDA, USE_CUDA=ON
Call Stack (most recent call first):
CMakeLists.txt:92 (include)

环境:linux
cuda版本:11.6
nvcc正常,nvidia-smi正常

@NeighborhoodCoding
Copy link

NeighborhoodCoding commented Dec 9, 2024

出现此错误的原因是 CMake 无法找到 CUDA 工具包,即使 nvcc 与 nvidia-smi 可以正常运行,也不代表 CMake 已正确定位到 CUDA 的头文件和库

请尝试以下方法解决

export CUDA_HOME=/usr/local/cuda
export PATH=$CUDA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH

@vfdff
Copy link

vfdff commented Dec 23, 2024

参考 https://blog.csdn.net/bigbaojian/article/details/129642388,执行 apt install nvidia-cuda-toolkit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants