llvm
22e5cedf - [SYCL] Implement reduction properties extension (#15804)

Commit
1 year ago
[SYCL] Implement reduction properties extension (#15804) Adds support for initialize_to_identity and deterministic properties. Since this extension is only experimental, the implementation here avoids making significant changes to reduction-related classes (e.g, reducer). A more straightforward implementation that attaches a compile-time property list to these classes is possible, but may be considered an ABI break. --- A note to reviewers: it occurred to me that `IsDeterministicOperator<BinaryOperation>` might actually be better as `IsDeterministicOperator<T, BinaryOperation>`, so that the implementation can infer that it's safe to use the faster reductions for certain types (e.g., `int` and `sycl::plus<>()` can safely use atomics) but I wanted to get your feedback on the proposed approach before going any further. **EDIT**: To clarify, I think such changes to `IsDeterministicOperator` could be left until a future PR, since the behavior of the `deterministic` property as implemented here should match the legacy `SYCL_DETERMINISTIC_REDUCTION` macro. We could implement optimizations later. --------- Signed-off-by: John Pennycook <john.pennycook@intel.com>
Author
Parents
Loading