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

Function test_max_pool2d

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

Source from the content-addressed store, hash-verified

322
323
324def test_max_pool2d():
325 remote_obj, tracker = remote()
326
327 def create_model() -> tvm.IRModule:
328 @tvm.script.ir_module
329 class Module:
330 @R.function
331 def main(
332 i0: R.Tensor((1, 1, 28, 28), "float32"),
333 ):
334 with R.dataflow():
335 t0 = R.nn.max_pool2d(i0, pool_size=(1, 1), strides=(1, 1), padding=(0, 0))
336 R.output(t0)
337 return t0
338
339 return Module
340
341 mod = create_model()
342 verify(
343 remote_obj,
344 tracker,
345 mod,
346 inputs=[
347 np.random.random(size=(1, 1, 28, 28)).astype("float32"),
348 ],
349 )
350
351
352def verify(remote_obj, tracker, mod, inputs):

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…