Repository navigation
Unwrap zip_iterators in DeviceTransform - #11255
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughChangesDeviceTransform zip support
Assessment against linked issues
Priority: ⬇️ Low — Defer the zip-iterator handling change because it is a targeted CUB and Thrust transform compatibility improvement without evidence of urgent external impact. Merge Risk: 🔵 Low · up to Zip-based Thrust transforms may copy callable objects rather than moving them, potentially rejecting move-only callables or adding unnecessary copying. The impact is bounded, but the path should be aligned before merge where possible. Comment |
Co-authored-by: Michael Schellenberger Costa <[email protected]>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cub/cub/device/device_transform.cuh (1)
196-196: 🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick winsuggestion: Move
THRUST_NS_QUALIFIER::zip_function<TransformOp>::underlying_function()when forwarding. The accessor returnsFunction&, so the current lvalue selects the generic__transform_internaloverload by copyingTransformOp. This adds a copy and rejects move-only callables. Use::cuda::std::move(transform_op.underlying_function())and add a move-only-callable test.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2d8a3715-628d-4050-a5d1-baf7c23e0a42
📒 Files selected for processing (1)
cub/cub/device/device_transform.cuh
Included review availability: Your plan provides up to 12 included reviews per hour; 8 remain after this review.
…rom docs Removing <thrust/zip_function.h>/<thrust/iterator/zip_iterator.h> from thrust/system/cuda/detail/transform.h broke a few files that relied on the transitive include for thrust::make_zip_function. Add the include directly where it's used. Also wrap the thrust::zip_iterator/zip_function forward declarations in device_transform.cuh with @cond/@endcond so Doxygen doesn't treat them as duplicate declarations of the real Thrust classes.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
cub/cub/device/device_transform.cuh (1)
136-137: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuesuggestion: Both branches repeat the
::cuda::std::is_same_v<Predicate, ::cuda::always_true>test. Hoist it into a localconstexpr booland keep the twoif constexprconditions to the zip traits. This keeps the intent visible if a third zip flavor is added.Also applies to: 147-148
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: a7ef1ede-9ca8-4053-919c-4591f22c0c9c
📒 Files selected for processing (2)
cub/cub/device/device_transform.cuhcub/test/catch2_test_device_transform.cu
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review.
🥳 CI Workflow Results🟩 Finished in 2h 53m: Pass: 100%/230 | Total: 10d 04h | Max: 2h 46m | Hits: 45%/827538See results here. |
Fixes: NVIDIA#7442 Co-authored-by: Michael Schellenberger Costa <[email protected]>
Fixes: NVIDIA#7442 Co-authored-by: Michael Schellenberger Costa <[email protected]>
Fixes: #7442