MCPcopy Index your code
hub / github.com/apache/tvm / test_kernel_sharing

Function test_kernel_sharing

tests/python/relax/test_codegen_cutlass.py:134–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133
134def test_kernel_sharing():
135 low, high = -1, 1
136 data_np = np.random.randint(low, high, size=(16, 32, 32, 8)).astype("float16")
137 weight1_np = np.random.randint(low, high, size=(8, 3, 3, 8)).astype("float16")
138 weight2_np = np.random.randint(low, high, size=(8, 3, 3, 8)).astype("float16")
139
140 out = get_result_with_relax_cutlass_offload(
141 Conv2dx2, data_np, weight1_np, weight2_np, assert_all_bindings_fused=False
142 )
143 ref = build_and_run(Conv2dx2, [data_np, weight1_np, weight2_np], "llvm")
144
145 np.testing.assert_equal(out, ref)
146
147
148def get_relax_conv2d_module(

Callers

nothing calls this directly

Calls 3

build_and_runFunction · 0.70
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…