Skip to content

make: add error message for bad CUDA version #5444

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

Merged

Conversation

JohannesGaessler
Copy link
Collaborator

Fixes #5294 in the sense that there is an error message to tell the user what the problem is. The root problem is that for old CUDA versions -arch=native is not supported. However, compiling for multiple compute capabilities like with cmake also has drawbacks: the compilation time would increase and nvcc does not seem to natively support compiling for multiple specific CUDA architectures in parallel. So you would instead have to compile multiple .cubin files and then link them together. And since this is only an issue for old CUDA versions I think it's fine to just add an error message that tells users how to fix it.

Currently the error message tells the user to set CUDA_DOCKER ARCH. The people with the problem were indeed using Docker but in principle you could have this exact same problem with bare metal. Should we rename the argument to something like CUDA_ARCH?

@cebtenzzre
Copy link
Collaborator

Should we rename the argument to something like CUDA_ARCH?

I am a proponent of this change, calling it CUDA_DOCKER_ARCH never made sense to me.

Co-authored-by: Jared Van Bortel <[email protected]>
@ggerganov
Copy link
Member

Should we rename the argument to something like CUDA_ARCH?

Btw, on similar note, we should rename LLAMA_CUBLAS to LLAMA_CUDA and GGML_USE_CUBLAS to GGML_USE_CUDA at some point

@JohannesGaessler JohannesGaessler merged commit ad014bb into ggml-org:master Feb 13, 2024
jordankanter pushed a commit to jordankanter/llama.cpp that referenced this pull request Mar 13, 2024
* make: add error message for bad CUDA version

* Update Makefile

Co-authored-by: Jared Van Bortel <[email protected]>

---------

Co-authored-by: Jared Van Bortel <[email protected]>
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 1, 2024
* make: add error message for bad CUDA version

* Update Makefile

Co-authored-by: Jared Van Bortel <[email protected]>

---------

Co-authored-by: Jared Van Bortel <[email protected]>
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

Successfully merging this pull request may close these issues.

nvcc fatal : Value 'native' is not defined for option 'gpu-architecture' when compiling cuBLAS
4 participants