Skip to content

CUDA: fix __builtin_assume for CUDA < 11.2 #2669

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

Conversation

JohannesGaessler
Copy link
Collaborator

Reportedly there are compilation issues on old CUDA versions due to __builtin_assume, see #2458 (comment) . This PR attempts to fix the issue by defining a dummy implementation for old CUDA versions. I don't have old CUDA versions installed on any of my old machines, so I did not test that the dummy implementation actually fixes the compilation issues (but the code seemed to work correctly with CUDA 12 when using the dummy implementation). @whoreson please confirm that this fixes the compilation issue for you.

@whoreson
Copy link
Contributor

It does compile now, and seems to be working too. BTW, this patch is also needed: ggml-org/whisper.cpp#1018 (comment)

And because the older nvcc doesn't support the --forward-unknown-to-host-compiler option:

  •   NVCCFLAGS = --forward-unknown-to-host-compiler
    
  •   NVCCFLAGS := --compiler-options="$(CFLAGS)"
    

@JohannesGaessler
Copy link
Collaborator Author

Closed in favor of #3132

vieenrose added a commit to vieenrose/whisper.cpp-Jetson-nano that referenced this pull request Dec 18, 2023
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.

4 participants