MCPcopy Create free account
hub / github.com/tile-ai/tilelang / assert_gemm_codegen

Function assert_gemm_codegen

testing/python/webgpu/test_webgpu_codegen.py:34–51  ·  view source on GitHub ↗
(
    M,
    N,
    K,
    block_M,
    block_N,
    block_K,
    dtype=T.float16,
    accum_dtype=T.float32,
)

Source from the content-addressed store, hash-verified

32
33
34def assert_gemm_codegen(
35 M,
36 N,
37 K,
38 block_M,
39 block_N,
40 block_K,
41 dtype=T.float16,
42 accum_dtype=T.float32,
43):
44 func = matmul(M, N, K, block_M, block_N, block_K, dtype=dtype, accum_dtype=accum_dtype)
45 # Because the current pass context have been polluted by previous testing.
46 with tvm.transform.PassContext(), tvm.target.Target("webgpu"):
47 artifact = tilelang.lower(func, target="webgpu")
48
49 src_code = artifact.kernel_source
50
51 assert src_code is not None
52
53
54def test_gemm_codegen():

Callers 1

test_gemm_codegenFunction · 0.85

Calls 2

matmulFunction · 0.70
lowerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…