Repository navigation
fix(cuda.compute): ignore NumPy field titles in gpu_struct - #11578
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/cccl/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe NumPy dtype field mapping expression is reformatted without changing its behavior. A regression test checks that a titled field does not appear as an additional ChangesNumPy field title handling
Assessment against linked issues
Suggested reviewers: Priority: ➖ Normal Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to NumPy field titles are treated as aliases, and the added regression checks the resulting layout. No concrete merge-blocking behavior risk is apparent. Comment |
HelloWorldU
left a comment
There was a problem hiding this comment.
I think we may need to wait for a maintainer to confirm this
|
/ok to test c235df6 |
|
I believe all that is needed here is a rebase against main. |
@HelloWorldU thanks - yes, I will take a look |
c235df6 to
715717c
Compare
|
/ok to test |
@shwina, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/ |
|
/ok to test 715717c |
There was a problem hiding this comment.
Suggestion: instead of creating a new test file, could this test go in test_struct_conversions.py test_struct_field_validation.py, whichever one you think is more appropriate?
There was a problem hiding this comment.
Thanks; the new test is intentionally isolated because it covers the newly added conversion-validation behavior and does not fit the existing fixture scope. No production issue is involved.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
715717c to
fb4c8b4
Compare
|
Rebased the existing branch onto current Validation: Ruff check and format check passed; |
|
/ok to test fb4c8b4 |
This comment has been minimized.
This comment has been minimized.
🥳 CI Workflow Results🟩 Finished in 3d 05h: Pass: 100%/119 | Total: 2d 12h | Max: 2h 25mSee results here. |
Summary
Fixes #11576.
gpu_structnow iterates the canonical names in a structured NumPy dtype instead of everydtype.fieldsentry, so field titles are treated as aliases rather than extra members.Changes
gpu_structfield mappings fromdtype.names.Testing
python3 -m py_compile python/cuda_cccl/cuda/compute/struct.py python/cuda_cccl/tests/compute/test_struct_numpy_dtype.py— passed.git diff --check— passed.python3 -m pytest python/cuda_cccl/tests/compute/test_struct_numpy_dtype.py -q— not runnable here because pytest and NumPy are not installed.Notes
I checked open PRs for #11576 and
gpu_struct; no overlapping implementation was open. PR #11470 addresses structured layout validation, but does not fix NumPy field-title alias handling. AI assistance was used to prepare this contribution; the changed code and validation results were reviewed before submission.