Repository navigation
Fix #3246: Correctly check .pyx/.pxd dependencies, and fix inline lints - #3255
Merged
Merged
Conversation
leofang
approved these changes
Oct 27, 2026
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Error checks and Cython support cuda_core/cuda/core/_utils/cuda_utils.pxd, cuda_core/cuda/core/_utils/cuda_utils.pyx, cuda_core/cuda/core/_utils/cuda_utils.pyi, cuda_core/cuda/core/_memory/_legacy.py, .pre-commit-config.yaml |
Error-check declarations now return success or delegate failures to renamed helpers. The stub adds success constants and removes private checker declarations. The lint hook targets cuda_core/cuda, runs serially, and does not pass filenames. An import gains a type-checking annotation. |
Stream-token checks cuda_core/cuda/core/_stream.pxd, cuda_core/cuda/core/_stream.pyx |
Inline checks in the declaration file recognize both default-stream tokens, while the legacy-only check recognizes only the legacy token. The former implementations are removed from the .pyx file. |
Memcpy operand resolution cuda_core/cuda/core/graph/_graph_node.pxd, cuda_core/cuda/core/graph/_graph_node.pyx |
Inline helpers resolve Buffer and integer-address operands to device pointers and attachment owners. The former local helpers are removed from the .pyx file. |
Possibly related issues
- [BUG]: cython-lint can miss cross-file inline violations when pre-commit batches files #3246: The lint-hook change matches the issue’s proposed serialized, full-directory invocation. The issue’s separate
cdef inlinechanges are not included here. - Fix performance regression in #3209 #3252: The stream-token checks are now inline in
_stream.pxd, matching the issue’s report about removed inline declarations.
Possibly related PRs
- NVIDIA/cuda-python#3209: This PR changes the same error-check helpers and their inline declarations.
- NVIDIA/cuda-python#3173: This PR also changes the Cython lint configuration and binding exclusions.
- NVIDIA/cuda-python#3243: This PR changes the same stream default-token detection helpers.
Suggested reviewers: andy-jost, juenglin, jpascucci-nv
Priority:
Change: Bug fix
Merge Risk: 
Minimal · up to b0f9c
-
No merge-blocking issue was established; the change is ready for normal checks.
Finishing Touches: 💡 1
-
🛠️ Fix failing CI checks: 💡
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
rwgk
approved these changes
Oct 27, 2026
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.
#3209 upgraded cython-lint which added a new lint for inline functions that wouldn't be properly inlined across modules. To fix the lints,
inlinewas removed from some functions, creating a performance regression, rather than moving the function definitions to the.pxdfiles.Additionally, if cython-lint doesn't see all the files together, it can not correctly detect these cross-file issues. The fix is to always pass all of the cython files to cython-lint when any file in
cuda_core/cudachanges.