Skip to content

Commit be6bced

Browse files
Merge pull request #1565 from IntelPython/boolean-reduction-always-allocate-reduction-temporary-as-usm-device
Boolean reductions allocate int32 temporary as USM-device
2 parents fe75a16 + b89b37f commit be6bced

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dpctl/tensor/_utility_functions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,13 @@ def _boolean_reduction(x, axis, keepdims, func):
3636
res_usm_type = x.usm_type
3737

3838
wait_list = []
39+
# always allocate the temporary as
40+
# int32 and usm-device to ensure that atomic updates
41+
# are supported
3942
res_tmp = dpt.empty(
4043
res_shape,
4144
dtype=dpt.int32,
42-
usm_type=res_usm_type,
45+
usm_type="device",
4346
sycl_queue=exec_q,
4447
)
4548
hev0, ev0 = func(

0 commit comments

Comments
 (0)