Repository navigation
Use the new tuning API internally for detail::select::dispatch and DeviceSelect - #8880
Conversation
This comment has been minimized.
This comment has been minimized.
|
Compilation error for some compiler/standard combination: |
|
There are SASS diffs for |
This comment has been minimized.
This comment has been minimized.
5dcad17 to
a842d5c
Compare
They were caused by removing the InPlace benchmarks. I split out the commit dropping them and then diffed that commit with HEAD. No SASS changes now. |
This comment has been minimized.
This comment has been minimized.
a842d5c to
1dbbe5a
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
6e21bf6 to
580d2ef
Compare
This comment has been minimized.
This comment has been minimized.
580d2ef to
3eda066
Compare
|
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 (8)
📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughThis PR refactors CUB's ChangesTuning API adoption for DeviceSelect and Thrust integration
Assessment against linked issues
Out-of-scope changesNo out-of-scope changes detected. All modifications are directly related to adopting the tuning API for Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
🥳 CI Workflow Results🟩 Finished in 3h 03m: Pass: 100%/340 | Total: 16d 06h | Max: 2h 58m | Hits: 12%/2342155See results here. |
| if constexpr (InPlace::value) | ||
| { | ||
| _CCCL_TRY_CUDA_API( | ||
| cub::DeviceSelect::Flagged, | ||
| "DeviceSelect::Flagged failed", | ||
| d_in, | ||
| d_flags, | ||
| d_num_selected, | ||
| static_cast<offset_t>(elements), | ||
| env); | ||
| } |
There was a problem hiding this comment.
Critical: for all new in place variant benchmarks, the input values will change between runs. This will affect the performance reported. We should maintain the original values and copy them in each iteration. We can use nvbench::exec_tag::timer to avoid timing the copy
There was a problem hiding this comment.
That's a valid observation! Now I wonder what the original benchmark's use case was? For the in-place versions it measured the in-place implementation but on distinct input and output ranges, a case not reachable with the public CUB API.
| template <typename InputT> | ||
| struct policy_hub_t | ||
| struct bench_policy_selector | ||
| { | ||
| struct policy_t : cub::ChainedPolicy<300, policy_t, policy_t> | ||
| [[nodiscard]] _CCCL_API constexpr auto operator()(cuda::compute_capability) const | ||
| -> cub::detail::select::select_if_policy | ||
| { | ||
| using SelectIfPolicyT = | ||
| cub::AgentSelectIfPolicy<TUNE_THREADS_PER_BLOCK, | ||
| TUNE_ITEMS_PER_THREAD, | ||
| TUNE_LOAD_ALGORITHM, | ||
| TUNE_LOAD_MODIFIER, | ||
| cub::BLOCK_SCAN_WARP_SCANS, | ||
| delay_constructor_t>; | ||
| }; | ||
|
|
||
| using MaxPolicy = policy_t; | ||
| return {TUNE_THREADS_PER_BLOCK, | ||
| TUNE_ITEMS_PER_THREAD, | ||
| (TUNE_TRANSPOSE == 0 ? cub::BLOCK_LOAD_DIRECT : cub::BLOCK_LOAD_WARP_TRANSPOSE), | ||
| (TUNE_LOAD == 0 ? cub::LOAD_DEFAULT : cub::LOAD_CA), | ||
| cub::BLOCK_SCAN_WARP_SCANS, | ||
| delay_constructor_policy}; | ||
| } |
This change is necessary for compatibility with the latest CCCL. These failures stem from NVIDIA/cccl#8880 changing `thrust::unique` to use `cub::DeviceSelect::unique`, which triggers an additional `static_cast` via `invoke_result`. Authors: - Vyas Ramasubramani (https://github.com/vyasr) - https://github.com/jakirkham - Chuck Hastings (https://github.com/ChuckHastings) Approvers: - Bradley Dice (https://github.com/bdice) - Chuck Hastings (https://github.com/ChuckHastings) - https://github.com/jakirkham - Michael Schellenberger Costa (https://github.com/miscco) URL: #5528
DeviceSelect::Unique#8896cub.bench.select.flagged.baseon SM75;80;86;90;100cub.bench.select.if.baseon SM75;80;86;90;100cub.bench.select.unique.baseon SM75;80;86;90;100thrust.test.uniqueon SM120 (quick sanity check)thrust.test.copyon SM120 (quick sanity check)Fixes: #8379