Skip to content

Commit 64cbed5

Browse files
committed
Enable 'test_side_effectful_reduction' on XPU
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 8382e76 commit 64cbed5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

python/test/unit/language/test_core.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6050,8 +6050,6 @@ def sanitize_add(a, b):
60506050

60516051

60526052
def test_side_effectful_reduction(device):
6053-
if device != "cuda":
6054-
pytest.xfail()
60556053

60566054
@triton.jit(debug=True)
60576055
def sanitize_sum_kernel(Z, X, BLOCK: tl.constexpr):
@@ -6061,10 +6059,10 @@ def sanitize_sum_kernel(Z, X, BLOCK: tl.constexpr):
60616059

60626060
BLOCK = 512
60636061
torch.manual_seed(42)
6064-
X = torch.randint(0, 10, [BLOCK], device="cuda", dtype=torch.int32)
6062+
X = torch.randint(0, 10, [BLOCK], device=device, dtype=torch.int32)
60656063
X[:300] = 32
60666064
X[300:] = 0
6067-
Z = torch.zeros((), device="cuda", dtype=torch.int32)
6065+
Z = torch.zeros((), device=device, dtype=torch.int32)
60686066
sanitize_sum_kernel[(1, )](Z, X, BLOCK=BLOCK)
60696067
torch.testing.assert_close(Z, X.sum().to(torch.int32))
60706068

0 commit comments

Comments
 (0)