cuda.core: emit -numba-debug to libNVVM, not --numba-debug - #2571
Open
fedonman wants to merge 1 commit into
Open
cuda.core: emit -numba-debug to libNVVM, not --numba-debug#2571fedonman wants to merge 1 commit into
fedonman wants to merge 1 commit into
Conversation
libNVVM accepts only single-dashed options, so every ProgramOptions(numba_debug=True) compile on the NVVM backend failed with NVVM_ERROR_INVALID_OPTION. numba-cuda emits -numba-debug for the same path. The NVRTC backend tolerates both spellings and is left alone. The guarding test probed libNVVM with the same wrong spelling, so it skipped on every configuration and never caught this. Probe and assert the spelling the code now emits, and drop the skip reason's claim that the option needs CTK 13.2: libNVVM rejects the double-dashed form at any version. Closes NVIDIA#2570 Signed-off-by: Vyron Vasileiadis <hi@fedonman.com>
Contributor
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.
Summary
Closes #2570.
libNVVM accepts only single-dashed options, but
_prepare_nvvm_options_implemitted--numba-debug, so everyProgramOptions(numba_debug=True)compile on the NVVM backend failed withNVVM_ERROR_INVALID_OPTION. numba-cuda emits-numba-debugfor the same path. The NVRTC backend tolerates both spellings and is left alone.The guarding test never caught this because it probed libNVVM with the same wrong spelling, so it skipped on every configuration, including CUDA 13.3. It is one of the entries in #2077.
Changes
_program.pyx: emit-numba-debugin_prepare_nvvm_options_impl. The NVRTC call site is unchanged.tests/test_program.py: probe and assert the emitted spelling, add an assertion that the double-dashed form is absent, and drop the skip reason's claim that the option needs CTK 13.2 (libNVVM rejects the double-dashed form at any version).docs/source/release/1.2.0-notes.rst: release note. The wrong spelling is in released 1.1.0 and 1.1.1.Verification
test_nvvm_program_numba_debugpreviously skipped everywhere. It now runs and passes, and it fails without the production change:With the change:
Whole module, before and after: