You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LinkerOptions.numba_debug (cuda_core/cuda/core/_linker.pyx:309) is declared as a public field but is never emitted by either backend. Neither _prepare_nvjitlink_options nor _prepare_driver_options references it, so setting it has no effect and no error.
This is not merely a dead field. _translate_program_options (cuda_core/cuda/core/_program.pyx:745) actively forwards numba_debug from ProgramOptions into LinkerOptions:
That translation runs on the code_type == "ptx" path of Program, so Program(ptx, "ptx", ProgramOptions(numba_debug=True)) also drops the option. It is a silent drop on a live code path, which conflicts with the repository's "no silent failures" guidance: an option the user explicitly set should either take effect or raise, not vanish.
Introduced in #2158 (792ab3c9fea), the same change that added numba_debug to ProgramOptions. The NVVM half of that feature was separately broken and is fixed in #2639; this linker half is untouched by that PR.
Raise if numba_debug is set on a backend that cannot honor it, consistent with how _prepare_nvvm_options_impl raises CUDAError for options the NVVM backend does not support, or
Remove the field if it was never meant to be plumbed through the linker, and stop _translate_program_options from forwarding it.
Whichever is chosen, a user-set option should not disappear without a diagnostic.
Type of Bug
Silent incorrect behavior (no error raised)
Component
cuda.core
Describe the bug
LinkerOptions.numba_debug(cuda_core/cuda/core/_linker.pyx:309) is declared as a public field but is never emitted by either backend. Neither_prepare_nvjitlink_optionsnor_prepare_driver_optionsreferences it, so setting it has no effect and no error.This is not merely a dead field.
_translate_program_options(cuda_core/cuda/core/_program.pyx:745) actively forwardsnumba_debugfromProgramOptionsintoLinkerOptions:That translation runs on the
code_type == "ptx"path ofProgram, soProgram(ptx, "ptx", ProgramOptions(numba_debug=True))also drops the option. It is a silent drop on a live code path, which conflicts with the repository's "no silent failures" guidance: an option the user explicitly set should either take effect or raise, not vanish.Introduced in #2158 (
792ab3c9fea), the same change that addednumba_debugtoProgramOptions. The NVVM half of that feature was separately broken and is fixed in #2639; this linker half is untouched by that PR.How to Reproduce
The field is
True, but no corresponding option is emitted.grep -n numba cuda_core/cuda/core/_linker.pyxreturns only the field declaration.Expected behavior
One of:
ProgramOptionsNVVM fix in fix(cuda.core): emit -numba-debug with a single dash for NVVM #2639, ornumba_debugis set on a backend that cannot honor it, consistent with how_prepare_nvvm_options_implraisesCUDAErrorfor options the NVVM backend does not support, or_translate_program_optionsfrom forwarding it.Whichever is chosen, a user-set option should not disappear without a diagnostic.
Operating System
Linux, CUDA 13.3 (reproduced against
main)