-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix CUDA 13 LTO architecture selection with older CMake #23862
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
Open
wjxiz1992
wants to merge
7
commits into
NVIDIA:main
Choose a base branch
from
wjxiz1992:codex/fix-cuda13-lto-architecture
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+9
−12
Open
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
492980e
Fix LTO architecture selection with older CMake
wjxiz1992 9938b82
Simplify LTO architecture selection
wjxiz1992 d5adef4
Merge branch 'main' into codex/fix-cuda13-lto-architecture
wjxiz1992 b3440be
Merge branch 'main' into codex/fix-cuda13-lto-architecture
robertmaynard f69a448
Merge branch 'main' into codex/fix-cuda13-lto-architecture
igorpeshansky 929f659
Merge branch 'main' into codex/fix-cuda13-lto-architecture
vyasr e27004c
Merge branch 'main' into codex/fix-cuda13-lto-architecture
igorpeshansky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 193
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 22018
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 3159
🏁 Script executed:
Repository: NVIDIA/cudf
Length of output: 2665
🌐 Web query:
CMake set CACHE documentation existing cache entry FORCE does not overwrite💡 Result:
In CMake, the set command with the CACHE option is designed to respect existing values in the cache [1][2]. By default, if a cache entry with the specified name already exists, the set command will not overwrite it [1][3]. The FORCE option exists specifically to override this behavior, forcing the command to overwrite any existing cache entry with the provided value [1][2]. If you are encountering a situation where FORCE does not appear to be working or you are confused about why a value is not being updated, consider these common technical reasons: 1. FORCE is being used when it should not be: If your intention is to allow a user to override a default value (e.g., via the command line with -DVAR=VAL), you should remove the FORCE option [4]. Including FORCE instructs CMake to always ignore the user's previously set value and reset it to the value defined in your CMakeLists.txt file [2][4]. 2. Evaluation Order and Scope: Cache variables are global [5]. If your CMake project involves multiple directories or subprojects, the order in which files are processed and variables are defined matters. 3. Normal Variables vs. Cache Variables: Remember that when you evaluate a variable using ${VAR}, CMake looks for a normal (local) variable first [1][6]. If a normal variable exists in the current scope with the same name as a cache variable, it will mask the cache variable [1][7]. If you need to ensure a specific value is used regardless of the cache, you can set a normal variable (without the CACHE option), which will take precedence over the cache entry in that scope [2][5]. 4. INTERNAL Type: If you use the INTERNAL type for a cache variable, the FORCE option is implied [1][7]. In summary, the FORCE option correctly overwrites existing cache entries [1][2]. If your value is not changing, it is likely that the command is either not being executed (e.g., because it is inside a conditional block that is not being entered) or, more commonly, that a local variable is masking the cache variable, or the user is misunderstanding the intended purpose of FORCE, which is to enforce a hardcoded value rather than permit user customization [2][5][4].
Citations:
Migrate the legacy empty
CUDF_LTO_ARCHITECTUREcache value.The previous configuration created an empty cache entry. The new
set(... CACHE ...)call does not replace it, so an upgraded build directory can retain the empty value. The numeric validation at Lines 198-200 then fails during reconfiguration.Force the new default only when the existing cache value is empty. Preserve explicit non-empty overrides.
🤖 Prompt for AI Agents