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

Function test_matmul

tests/python/nightly/test_nnapi/test_ops.py:176–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174
175
176def test_matmul():
177 remote_obj, tracker = remote()
178
179 def create_model() -> tvm.IRModule:
180 @tvm.script.ir_module
181 class Module:
182 @R.function
183 def main(
184 i0: R.Tensor((5, 3, 4), "float32"),
185 i1: R.Tensor((5, 4, 8), "float32"),
186 ) -> R.Tensor((5, 3, 8), "float32"):
187 with R.dataflow():
188 t0 = R.matmul(i0, i1)
189 R.output(t0)
190 return t0
191
192 return Module
193
194 mod = create_model()
195 verify(
196 remote_obj,
197 tracker,
198 mod,
199 inputs=[
200 np.random.random(size=(5, 3, 4)).astype("float32"),
201 np.random.random(size=(5, 4, 8)).astype("float32"),
202 ],
203 )
204
205
206def test_permute_dims():

Callers

nothing calls this directly

Calls 4

remoteFunction · 0.90
create_modelFunction · 0.70
verifyFunction · 0.70
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…