MCPcopy Create free account
hub / github.com/apache/tvm / test_gemm_async_partial_scale_factor

Function test_gemm_async_partial_scale_factor

tests/python/tirx/test_op.py:60–73  ·  view source on GitHub ↗

Regression test for F7: gemm_async must reject partial scale factors.

()

Source from the content-addressed store, hash-verified

58
59
60def test_gemm_async_partial_scale_factor():
61 """Regression test for F7: gemm_async must reject partial scale factors."""
62 from tvm.tirx.script.builder.tirx import gemm_async
63
64 A = decl_buffer((64, 64), "float16", scope="shared")
65 B = decl_buffer((64, 64), "float16", scope="shared")
66 C = decl_buffer((64, 64), "float16", scope="shared")
67 SF = decl_buffer((64,), "float16", scope="shared")
68
69 with pytest.raises(ValueError, match="SFA and SFB must both be provided or both be None"):
70 gemm_async(C[:, :], A[:, :], B[:, :], SFA=SF[:])
71
72 with pytest.raises(ValueError, match="SFA and SFB must both be provided or both be None"):
73 gemm_async(C[:, :], A[:, :], B[:, :], SFB=SF[:])
74
75
76if __name__ == "__main__":

Callers 1

test_op.pyFile · 0.85

Calls 2

decl_bufferFunction · 0.90
gemm_asyncFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…