Repository navigation
Add env SegmentedReduce (non fixed-size overloads) - #7795
Conversation
2aa7447 to
d442948
Compare
|
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.
83c6791 to
535da7d
Compare
This comment has been minimized.
This comment has been minimized.
535da7d to
7a15fdf
Compare
|
I removed the helper underlying implementation function for fixed segment size overloads as it pre required knowledge of the |
|
adding missing unit tests just now |
4d49de7 to
44d9d80
Compare
44d9d80 to
f4048ec
Compare
This comment has been minimized.
This comment has been minimized.
miscco
left a comment
There was a problem hiding this comment.
Looks good.
@bernhardmgruber I observe that we are really loose with the naming conventions We have InitValueT, init_value_t, init_t, no alias at all Same for AccumT and so on
We really should be more consistent
f4048ec to
e62f191
Compare
…r to common impl
- Add private segmented_reduce_impl that centralizes determinism
validation (static_assert rejecting gpu_to_gpu), dispatch_with_env,
and tuning extraction, eliminating boilerplate across all env overloads
- Refactor Reduce, Sum, Min, Max env overloads to delegate to
segmented_reduce_impl
- Add new env overloads for ArgMin and ArgMax with full documentation
including literalinclude snippet tags
- Rewrite env_api tests covering all 6 APIs (Reduce, Sum, Min, Max,
ArgMin, ArgMax) with determinism and stream_ref acceptance tests
- Unify _env.cu and _env_launch.cu into a single _env.cu test file
with default env, launch wrapper, custom stream, and tuning tests
…ed extra redundant logic for no reason
- Add missing non-overlap precondition to env ArgMin and ArgMax docs - Reorder env tests: group all env tests before custom stream tests - Add not_guaranteed determinism test for Reduce env API
3e66fa1 to
20a1056
Compare
This comment has been minimized.
This comment has been minimized.
bernhardmgruber
left a comment
There was a problem hiding this comment.
The header looks fine, except one issue:
20a1056 to
81312a6
Compare
🥳 CI Workflow Results🟩 Finished in 1h 10m: Pass: 100%/249 | Total: 2d 15h | Max: 53m 29s | Hits: 97%/159713See results here. |
* Add env SegmentedReduce
* Add env overloads for DeviceSegmentedReduce ArgMin/ArgMax and refactor to common impl
- Add private segmented_reduce_impl that centralizes determinism
validation (static_assert rejecting gpu_to_gpu), dispatch_with_env,
and tuning extraction, eliminating boilerplate across all env overloads
- Refactor Reduce, Sum, Min, Max env overloads to delegate to
segmented_reduce_impl
- Add new env overloads for ArgMin and ArgMax with full documentation
including literalinclude snippet tags
- Rewrite env_api tests covering all 6 APIs (Reduce, Sum, Min, Max,
ArgMin, ArgMax) with determinism and stream_ref acceptance tests
- Unify _env.cu and _env_launch.cu into a single _env.cu test file
with default env, launch wrapper, custom stream, and tuning tests
* Add env overloads for fixed size segment APIs
* add env api literalinclude example just for Reduce and remove non guaranteed api test
* Remove fixed_size_segmented_reduce_impl underlying function as it added extra redundant logic for no reason
* Add unit tests for fixed-seg-size overloads and argmin argmax
* Fix GCC 7 auto deduction in generic lambda for fixed-size ArgMin/ArgMax env overloads
* Use __query_result_or_t to query tuning environment
* Static assert on numeric_limits specialization
* reviews
* Use explicit types for plus/minimum/maximum in env overloads to avoid integer promotion
* Add cuda::stream-based env to all env API tests
* Turn stream.wait() to stream.sync()
* Remove fixed-size overloads to simplify PR
* Fix breaking change from specializations
* Sum(env...) was already there, reintroduce it with the same constrains
* Address review nits for DeviceSegmentedReduce env overloads
- Add missing non-overlap precondition to env ArgMin and ArgMax docs
- Reorder env tests: group all env tests before custom stream tests
- Add not_guaranteed determinism test for Reduce env API
* Add not_guaranteed query
* Docs nits
* Add run_to_run and not_guaranteed api tests
Split (1/2)
Adds env based overloads for non fixed-size segments
DeviceSegmentedReduce::*algorithmsMerge before #8097
Segmented Reduce is inherently
run_to_rundeterministic thus this is the largest deterministic guarantee allowed. If you believe there at some point can be an a perf optimization that will ruin this contract let me know and we will remove this promise in this PR. Otherwise we stay bound to that.