cmake: fix CMAKE_CUDA_ARCHITECTURES default #2421
Merged
+18
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because we specify a minimum CMake version of 3.21 in the llmodel project (gpt4all-backend), we get the NEW behavior of CMP0104, which causes
enable_langauge(CUDA)
to set CMAKE_CUDA_ARCHITECTURES to be set based on nvcc's default.On my machine this means CMAKE_CUDA_ARCHITECTURES gets set to 52, for my GTX 970. No idea what the v2.8.0 installers were built with, but with this change we can be sure that the next release will have the expected feature support
on 6.1+ architectures.
This is the issue that caused me to accidentally be able to reproduce the PTX incompatibility issue (because I was building for sm_52 but not sm_61), but it does not itself fix the inherent problem with the PTX code shipped with GPT4All v2.8.0 (they were built with too new of a CUDA version for many users, including all Linux users until NVIDIA 555.x comes out of Beta).