Skip to content

Commit

Permalink
[UT] Enable overflow check (#2656)
Browse files Browse the repository at this point in the history
Signed-off-by: Whitney Tsang <[email protected]>
  • Loading branch information
whitneywhtsang authored Nov 8, 2024
1 parent eadfd79 commit 468bec4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/triton/Dialect/Triton/IR/TritonOps.td
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ def TT_AssertOp : TT_Op<"assert", [MemoryEffects<[MemWrite<GlobalMemory>]>]> {
`tt.assert` takes a condition tensor and a message string.
If the condition is false, the message is printed, and the program is aborted.
}];
let arguments = (ins TT_Tensor:$condition, StrAttr:$message);
let arguments = (ins AnyTypeOf<[I1, I1Tensor]>:$condition, StrAttr:$message);
let assemblyFormat = "$condition `,` $message attr-dict `:` type($condition)";
}

Expand Down
8 changes: 4 additions & 4 deletions python/test/unit/language/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2595,8 +2595,8 @@ def kernel(X, Y, N, BLOCK_M: tl.constexpr, BLOCK_N: tl.constexpr, NUM_PID_N: tl.
@pytest.mark.parametrize("axis", [0, 1])
@pytest.mark.parametrize("add_overflow_check", [False, True])
def test_scan_layouts(M, N, src_layout, axis, add_overflow_check, device, tmp_path: pathlib.Path):
if add_overflow_check is True and (is_hip() or is_xpu()):
pytest.skip("overflow check disabled on HIP/XPU while fixing issues")
if add_overflow_check is True and is_hip():
pytest.skip("overflow check disabled on HIP while fixing issues")

overflow_check = """
%17 = arith.extsi %arg2 : i32 to i64
Expand Down Expand Up @@ -2689,8 +2689,8 @@ def test_reduce_layouts(M, N, src_layout, axis, epilogue_kind, dtype_str, add_ov
pytest.skip("Skipping because tensor shape is smaller than M(f)maLayout instr_shape")
if is_hip() and isinstance(src_layout, MfmaLayout) and ((M, N) == (128, 128)):
pytest.skip("Skipping test because it runs out of shared memory")
if add_overflow_check is True and (is_hip() or is_xpu()):
pytest.skip("overflow check disabled on HIP/XPU while fixing issues")
if add_overflow_check is True and is_hip():
pytest.skip("overflow check disabled on HIP while fixing issues")
if reduce_op == "sum" and dtype_str == "float16" and M * N > 1024:
pytest.xfail("Skipping sum reduction on float16 due to accuracy issues")

Expand Down

0 comments on commit 468bec4

Please sign in to comment.