Skip to content

Commit aa84a03

Browse files
[Intel] Fix test_zero_strided_tensors
Signed-off-by: Whitney Tsang <[email protected]>
1 parent 75658c1 commit aa84a03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/test/unit/language/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6577,7 +6577,7 @@ def _simple_add(
65776577

65786578
a, b, c = x.shape
65796579
grid = (a, b, c)
6580-
with torch.cuda.device(x.device.index):
6580+
with device == 'cuda' and torch.cuda.device(x.device.index) or torch.xpu.device(x.device.index):
65816581
_simple_add[grid](x, x.stride(0), x.stride(1))
65826582

65836583
assert torch.allclose(x, torch.ones_like(x) * c_dim)

0 commit comments

Comments
 (0)