fix|build[cartesian]: Fix NVCC default flags for -O0 and refactor configuration out of config.py#2524
Merged
romanc merged 2 commits intoGridTools:mainfrom Mar 12, 2026
Merged
Conversation
Move GPU compiler configuration out in `compiler.py` Force FMA (`fmad`) off for `-O0`
Contributor
|
cscs-ci run |
1 similar comment
Contributor
|
cscs-ci run |
Use separate `GT4PY_CARTESIAN_EXTRA_CUDA_COMPILE_ARGS` environment variable and not `GT4PY_EXTRA_COMPILE_ARGS` (same as CPU) because GPU compilers don't always follow the flag names of the CPU compilers. Adds a bit of (semi-related) cleanup: - names of enums are usually singular (e.g. *Name not *Names) - rely on type inference where possible
romanc
approved these changes
Mar 12, 2026
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.
Description
We introduced a bad behavior by forcing FMA deactivation in
-O0in #2520 by passing a flag tonvccthat isn't readable.While fixing the above we also moved the entire configuration of GPU device code & execution to the
compiler.pyflag to centralize and clean up the centralconfig.py.Everything remains functionally the same: environment variable have precedence on defaults and the entire GPU stack is setup out of CUDA_ROOT &
cupydevice.E.g.:
compiler.py-fmad=false) off for-O0-O0inGT4PY_COMPILE_OPT_LEVEL) - which is beyond the scope ofpytest