Skip to content

Commit 2d89be0

Browse files
committed
[FlyDSL] Use checkAllclose for the gfx1250 reducer split-group reference
Keep the bitwise torch.equal check and assert the mismatch ratio so the reference comparison fails the test instead of only logging.
1 parent 9bf53df commit 2d89be0

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎op_tests/test_flydsl_pa_decode.py‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
from aiter import per_tensor_quant, pertoken_quant
1616
from aiter.jit.utils.chip_info import get_gfx_runtime
17+
from aiter.test_common import checkAllclose
1718

1819

1920
@pytest.fixture
@@ -157,8 +158,16 @@ def run(partitions, groups):
157158
)
158159
# Plans keep every count within the partition bound.
159160
bounded = [seq for seq, c in enumerate(counts) if c <= partitions]
160-
torch.testing.assert_close(
161-
grouped[bounded, 0].float(), reference[bounded], atol=2e-2, rtol=2e-2
161+
err = checkAllclose(
162+
grouped[bounded, 0].float(),
163+
reference[bounded],
164+
atol=2e-2,
165+
rtol=2e-2,
166+
msg=f"split_groups partitions={partitions} split={split}",
167+
)
168+
assert err == 0, (
169+
f"split_groups partitions={partitions} split={split}: "
170+
f"mismatch ratio={err}"
162171
)
163172

164173

0 commit comments

Comments
 (0)