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

Function test_mean

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

Source from the content-addressed store, hash-verified

260
261
262def test_mean():
263 remote_obj, tracker = remote()
264
265 def create_model() -> tvm.IRModule:
266 @tvm.script.ir_module
267 class Module:
268 @R.function
269 def main(
270 i0: R.Tensor((1, 10, 15), "float32"),
271 ) -> R.Tensor((1, 10, 1), "float32"):
272 n = T.int64()
273 with R.dataflow():
274 t0: R.Tensor((1, 10, 1), "float32") = R.mean(i0, axis=[-1], keepdims=True)
275 R.output(t0)
276 return t0
277
278 return Module
279
280 mod = create_model()
281 verify(
282 remote_obj,
283 tracker,
284 mod,
285 inputs=[
286 tvm.runtime.tensor(np.random.uniform(size=(1, 10, 15)).astype("float32")),
287 ],
288 )
289
290
291def test_conv2d():

Callers

nothing calls this directly

Calls 5

remoteFunction · 0.90
uniformMethod · 0.80
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…