Move enum explanations and health checks from cuda_core to cuda_bindings#1805
Open
rwgk wants to merge 7 commits intoNVIDIA:mainfrom
Open
Move enum explanations and health checks from cuda_core to cuda_bindings#1805rwgk wants to merge 7 commits intoNVIDIA:mainfrom
rwgk wants to merge 7 commits intoNVIDIA:mainfrom
Conversation
…VIDIA#1712) The explanation dicts are fundamentally tied to the bindings version, so they belong in cuda_bindings. This copies them (keeping the cuda_core originals for backward compatibility) and adds the corresponding health tests under cuda_bindings/tests/. Made-with: Cursor
These tests now live in cuda_bindings/tests/test_enum_explanations.py, where they belong alongside the explanation dicts they verify. Made-with: Cursor
…llback (NVIDIA#1712) Each explanation module now tries to import the authoritative dict from cuda.bindings._utils (ModuleNotFoundError-guarded) and falls back to its own copy for older cuda-bindings that don't ship it yet. Smoke tests added for both dicts. Made-with: Cursor
NVIDIA#1712) Rename explanation dicts to _EXPLANATIONS / _FALLBACK_EXPLANATIONS, add _CTK_MAJOR_MINOR_PATCH to each module, and enforce that the cuda_core fallback copy is as new as (and in-sync with) cuda_bindings. Parametrize the smoke and version-check tests to cover both driver and runtime without duplication. Made-with: Cursor
…tring (NVIDIA#1712) Made-with: Cursor
Contributor
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Collaborator
Author
|
/ok to test |
|
Collaborator
Author
|
/ok to test |
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.
Closes #1712
The
DRIVER_CU_RESULT_EXPLANATIONSandRUNTIME_CUDA_ERROR_EXPLANATIONSdicts are fundamentally tied to the cuda-bindings release (they must match the enums shipped in that release). Having them live exclusively in cuda_core meant the health-check tests failed whenever cuda_core was tested against a different version of cuda-bindings.Refactor
cuda_bindings/cuda/bindings/_utils/as theauthoritative source (
_EXPLANATIONS+_CTK_MAJOR_MINOR_PATCH).cuda_core/cuda/core/_utils/(
_FALLBACK_EXPLANATIONS) so error messages still include human-readableexplanations when paired with older cuda-bindings that don't ship the dicts.
Each module tries to import from
cuda.bindings._utilsfirst(
ModuleNotFoundError-guarded) and falls back to the local copy.extras) to
cuda_bindings/tests/test_enum_explanations.py, where theybelong.
(
_CTK_MAJOR_MINOR_PATCHcomparison)