Hello gentoo science project, I was trying to compile llama.cpp::guru on my machine. It compiled successfully, however, it had runtime errors when launching the app via the CUDA backend.
After some googling, I found the existence of two environment variables: CMAKE_CUDA_ARCHITECTURES and CUDA_ARCHITECTURES. Both of them are CMAKE specific. After manually editing the llama.cpp::guru ebuild, I got this compilation error: "nvcc fatal : Unsupported gpu architecture 'compute_61'" That led me to find that my NVIDIA Card (GTX 1050) was not supported by my installed version of nvidia-cuda-toolkit: nvidia-cuda-toolkit-13.4.1. I found this on the 12.9.1 release of the CUDA toolkit (link: https://docs.nvidia.com/cuda/archive/12.9.1/pdf/CUDA_Toolkit_Release_Notes.pdf) Quote: > 2.6.1.1 Deprecated Architectures > Maxwell, Pascal, and Volta architectures are now feature-complete > with no further enhancements planned. While CUDA Toolkit 12.x > series will continue to support building applications for these > architectures, offline compilation and library support will be removed > in the next major CUDA Toolkit version release. Users should plan > migration to newer architectures, as future toolkits will be unable to > target Maxwell, Pascal, and Volta GPUs So, after installing dev-util/nvidia-cuda-toolkit-12.9.2 and re-compiling llama.cpp::guru, things seem (fingers crossed) to be working properly. My question/proposal is: - Would it be possible to add the CUDA_ARCHITECTURES environment variable to cuda.eclass? And, add a verification function that warns you if your card is going to work with the selected cuda toolkit version? - Could we create a CUDA article on the wiki? I know that pages can be edited but I'm not certain they can be created. I believe writing these findings down could help people in the future. Also, to document things like the gpu-architecture and gpu-code nvcc flags. I'd be more than willing to provide patches myself. Mainly asking if there are any things I need to take into consideration or any possible limitations. Thanks in advance, - Fabrizio P.S.: I'm not sure what the right mailing address is. I was hesitant about whether I should mail gentoo-sciente or the sci project itself. Since the CUDA ebuild is handled by the sci project, I decided to email them and gentoo-sciente mailing list just in case.
