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
fix(cuda.core): warn instead of silently dropping numba_debug on link paths (#2658)
`LinkerOptions` carries a public `numba_debug` field that no linking
backend reads. nvJitLink rejects the option under every spelling and the
driver's cuLink API has no corresponding `CUjit_option`, so setting it
does nothing and reports nothing.
It is not merely dead: `_translate_program_options` forwarded
`numba_debug` from `ProgramOptions` into `LinkerOptions` on the
`code_type="ptx"` path, so `Program(ptx, "ptx",
ProgramOptions(numba_debug=True))` silently discarded an option the user
explicitly set.
Make the drop audible without breaking any caller:
- `LinkerOptions.numba_debug` is deprecated. Setting it emits a
`DeprecationWarning` from `__post_init__` and the value is still
ignored. The field stays, so no constructor signature changes.
- `_translate_program_options` no longer forwards it and emits a
`UserWarning` saying it is ignored for `code_type="ptx"`. `UserWarning`
rather than `DeprecationWarning` because `ProgramOptions.numba_debug`
is not deprecated -- it is fully supported on NVVM and NVRTC and
merely inapplicable to a linking backend.
- The option builders are untouched; the linker needs no knowledge of
`numba_debug` to ignore it.
- `_LinkerBackend.validate` rejects nothing, and `numba_debug` stays out
of `_LINKER_FIELD_GATES`: it cannot change PTX-path output, so it must
not perturb the program-cache key.
The warning gates differ on purpose. The linker field uses `is not None`
-- the field itself is going away, so any explicit value earns the
notice, including `False`. The PTX path uses truthiness, matching
`_prepare_nvvm_options_impl`, because `False` asks for nothing.
Removal of `LinkerOptions.numba_debug` is deferred to 2.0.0: the support
policy confines breaking API changes to major-version boundaries and
requires a deprecation notice at least one minor release ahead. Nothing
in the repo tracks a scheduled removal -- the existing precedent
(`Device.max_links`) only says "a future release" -- so a version-gated
test fails the build once the version crosses 2.0.
The NVVM and NVRTC paths are unchanged and still emit the option.
Closes#2640
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/release_checklist.yml
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ body:
20
20
- label: File an internal nvbug to communicate test plan & release schedule with QA
21
21
- label: Ensure all pending PRs are reviewed, tested, and merged
22
22
- label: Check (or update if needed) the dependency requirements
23
+
- label: Sweep deprecations whose stated removal version has arrived (`grep -rn 'deprecated::' cuda_core/cuda`) and remove any that are due
23
24
- label: "Finalize the doc update, including release notes (\"Note: Touching docstrings/type annotations in code is OK during code freeze, apply your best judgement!\")"
0 commit comments