Repository navigation
Implement the new tuning API for DispatchHistogram - #8212
Conversation
|
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. |
This comment has been minimized.
This comment has been minimized.
| })); | ||
| NV_IF_TARGET( | ||
| NV_PROVIDES_SM_90, | ||
| (if (::cuda::std::reduce(num_output_bins_wrapper.begin(), num_output_bins_wrapper.end()) |
There was a problem hiding this comment.
Technically this should be
| (if (::cuda::std::reduce(num_output_bins_wrapper.begin(), num_output_bins_wrapper.end()) | |
| (if (::cuda::std::accumulate(num_output_bins_wrapper.begin(), num_output_bins_wrapper.end()) |
Because it is meant to be run serially
There was a problem hiding this comment.
Why? I just want to reduce a bunch of ints, so there is no need for that reduction to be performed left-to-right to preserve associativity.
| bool is_even; | ||
|
|
||
| private: | ||
| [[nodiscard]] _CCCL_API constexpr int t_scale(int nominal_items_per_thread) const |
There was a problem hiding this comment.
The function was called t_scale in the old policy_hub and I frankly don't know what its meaning is. @gevtushenko moved it around in e3fba75, so the name seems to have been around for a while :S
| [[nodiscard]] _CCCL_API constexpr auto operator()(::cuda::arch_id arch) const -> histogram_policy | ||
| { | ||
| auto policy = fallback_policy(); | ||
| if (arch >= ::cuda::arch_id::sm_90) |
There was a problem hiding this comment.
Nitpick: This goes contrary to the other policy selectors where we start with the newest policy and then move down.
Its also a bit confusing because the policy is not returned, so one has to look at the fields that are overwritten below.
Can we just keep the common order?
There was a problem hiding this comment.
ok, the state in this PR makes absolutely no sense. I wonder why it does not cause any SASS diffs then.
There was a problem hiding this comment.
ok, it should have worked, but it's very confusing. Fixed.
|
|
||
| int histogram_init_grid_dims = | ||
| (max_num_output_bins + histogram_init_block_threads - 1) / histogram_init_block_threads; | ||
| constexpr int histogram_init_block_threads = 256; |
There was a problem hiding this comment.
Question: Should this be something from the policy?
There was a problem hiding this comment.
Not at all, it's just a hardcoded parameter of the init kernel.
This comment has been minimized.
This comment has been minimized.
1d770fb to
683d315
Compare
🥳 CI Workflow Results🟩 Finished in 2h 55m: Pass: 100%/255 | Total: 8d 15h | Max: 1h 27m | Hits: 68%/160956See results here. |
cub.bench.histogram.even.basefor SM75;90;100cub.bench.histogram.range.basefor SM75;90;100cub.bench.histogram.multi.even.basefor SM75;90;100cub.bench.histogram.multi.range.basefor SM75;90;100The histogram dispatcher is unfortunately carrying some technical dept. If this PR turns out to be too hard to review, I can try to push a refactoring and rebase on top, to make the rewrite here smaller. Please let me know.
Fixes: #7637
Fixes: #7475