Skip to content

Commit 155b4ea

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] Add roi_align nondeterministic support for XPU (#8931)
Summary: Co-authored-by: frost-intel <frost.mitchell@intelcom> Reviewed By: scotts Differential Revision: D77997052 fbshipit-source-id: 40237bcbf1e8e42ca800538490b1dd237ffd67d5
1 parent 5a29a15 commit 155b4ea

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)