Skip to content

Commit 4df011d

Browse files
committed
delete leftovers
1 parent 3de296d commit 4df011d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

python/test/unit/test_debug.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,10 @@ def _test_overflow(x, y, x_dtype, y_dtype, debug, should_overflow, tri_func, ref
7979
y = torch.tensor([y], dtype=getattr(torch, y_dtype), device=device)
8080
z = torch.empty_like(x)
8181
if should_overflow and debug:
82-
# with pytest.raises(RuntimeError) as exc_info:
83-
try:
82+
with pytest.raises(RuntimeError) as exc_info:
8483
tri_func[(1, )](x, y, z, debug=debug)
8584
getattr(torch, device).synchronize()
86-
except RuntimeError as e:
87-
assert True
88-
assert "device-side assert" in str(e) #str(exc_info.value)
89-
assert False
85+
assert "device-side assert" in str(exc_info.value)
9086
else:
9187
tri_func[(1, )](x, y, z, debug=debug)
9288
getattr(torch, device).synchronize()

0 commit comments

Comments
 (0)