Skip to content
New issue

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

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

Already on GitHub? # to your account

backend(build): set CUDA arch defaults before enable_language(CUDA) #2855

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

cebtenzzre
Copy link
Member

This change included in v3.2.0 introduced a build regression that caused llama.cpp to build for only the CUDA 5.2 compute architecture by default. Normally this would only be a performance regression, but for whatever reason this seems to be causing incorrect output. If this fix is confirmed, we should report the issue upstream.

Why the defaults were wrong before this PR is best explained in my own words from a month ago: enable_language(CUDA) sets CMAKE_CUDA_ARCHITECTURES (assuming CMP0104 is enabled), so any defaults of our own must be set before this. This unfortunately means this code must be moved into the main backend CMakeLists.txt.

Follow-up to #2802

Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
@cebtenzzre cebtenzzre marked this pull request as ready for review August 13, 2024 17:11
@manyoso manyoso merged commit 7463b21 into main Aug 13, 2024
6 of 20 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants