build(ceres): respect CMAKE_CUDA_ARCHITECTURES, carry the fixes as a patch file - #73
Merged
Merged
Conversation
…patch file Ceres overwrites CMAKE_CUDA_ARCHITECTURES with its own generation table after enabling CUDA, discarding the toolchain's value, so the fat CI list and a local native both came out as 75;80;90. The patch makes the table the default only when none was supplied and moves it before enable_language(CUDA), where CMake consumes it; native now reaches nvcc as -arch=native and the installed library carries a single sm_75 image. The existing sed for the static companion's rejected generator expression folds into the same patches/ceresSolver.patch, so Ceres carries one patch mechanism. Both defects are proposed upstream; drop the patch when a release carries them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Ceres overwrites
CMAKE_CUDA_ARCHITECTURESwith its own GPU-generation table afterenable_language(CUDA), discarding whatever the toolchain supplied, so the fat CI list and a localnativeboth produced75;80;90. The patch keeps the table strictly as a default (if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)) and moves it beforeenable_language(CUDA), where CMake actually consumes the variable.enable_languageitself stays deferred because Ceres's CUDA is optional.Verified through robotFarm's own Ceres target on a fresh clone: both hunks apply,
nativereaches nvcc as-arch=native, and the installedlibceres.socarries a singlesm_75image. On the CI toolchains this lane should now yield the full twelve-architecture library.The existing sed for the static companion's rejected generator expression folds into the same
patches/ceresSolver.patch, so Ceres carries one patch mechanism. Both defects are proposed upstream; the patch retires when a release carries them.