Skip to content

Commit

Permalink
Merge pull request #1565 from IntelPython/boolean-reduction-always-al…
Browse files Browse the repository at this point in the history
…locate-reduction-temporary-as-usm-device

Boolean reductions allocate int32 temporary as USM-device
  • Loading branch information
oleksandr-pavlyk authored Feb 26, 2024
2 parents fe75a16 + b89b37f commit be6bced
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dpctl/tensor/_utility_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ def _boolean_reduction(x, axis, keepdims, func):
res_usm_type = x.usm_type

wait_list = []
# always allocate the temporary as
# int32 and usm-device to ensure that atomic updates
# are supported
res_tmp = dpt.empty(
res_shape,
dtype=dpt.int32,
usm_type=res_usm_type,
usm_type="device",
sycl_queue=exec_q,
)
hev0, ev0 = func(
Expand Down

0 comments on commit be6bced

Please sign in to comment.