Skip to content

Commit d28001e

Browse files
frost-intelfrost-intel
and
frost-intel
authored
Add roi_align nondeterministic support for XPU (#8931)
Co-authored-by: frost-intel <frost.mitchell@intelcom>
1 parent d462da2 commit d28001e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchvision/ops/roi_align.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ def roi_align(
250250
rois = convert_boxes_to_roi_format(rois)
251251
if not torch.jit.is_scripting():
252252
if (
253-
not _has_ops() or (torch.are_deterministic_algorithms_enabled() and (input.is_cuda or input.is_mps))
253+
not _has_ops()
254+
or (torch.are_deterministic_algorithms_enabled() and (input.is_cuda or input.is_mps or input.is_xpu))
254255
) and is_compile_supported(input.device.type):
255256
return _roi_align(input, rois, spatial_scale, output_size[0], output_size[1], sampling_ratio, aligned)
256257
_assert_has_ops()

0 commit comments

Comments
 (0)