Skip to content

Commit d9cd676

Browse files
committed
Address comments
Signed-off-by: Victor Perez <[email protected]>
1 parent d981d37 commit d9cd676

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

sycl/doc/design/KernelFusionJIT.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ by the range rounding transformation.
317317

318318
Kernel fusion of reductions is partially supported. In order to preserve the
319319
legality of the fused kernel, i.e., the fact that fused kernel must perform the
320-
same work as the graph of kernels to be fused, only the fusion of following
321-
reduction strategies at the time of writing is supported:
320+
same work as the graph of kernels to be fused, only the fusion of the following
321+
reduction strategies is supported at the time of writing:
322322

323323
- `group_reduce_and_last_wg_detection`
324324
- `local_atomic_and_atomic_cross_wg`
@@ -329,9 +329,12 @@ reduction strategies at the time of writing is supported:
329329
Other strategies require implicit inter-work-group synchronization, not
330330
supported in kernel fusion.
331331

332-
This way, users should not use `sycl::reduction` directly when performing kernel
333-
fusion in their code, as an unsupported algorithm might be chosen. They should
334-
instead use `sycl::detail::reduction_parallel_for`, forcing a supported fusion
332+
Users may encounters errors, e.g., fusion being aborted or incorrect results due
333+
to race conditions or any other cause, when using the `sycl::reduction`
334+
interface. The SYCL runtime will choose different algorithms depending on the
335+
reduction operator, data type and hardware capabilities, so strategy selection
336+
is not possible through the regular interface. In this case, users can instead
337+
use `sycl::detail::reduction_parallel_for`, forcing a supported fusion
335338
strategy. Reductions implementation in
336339
[`sycl/reduction.hpp`](../../include/sycl/reduction.hpp) might give users an
337340
insight into which kind of reductions to use for their purposes:

0 commit comments

Comments
 (0)