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

Function test_tensorrt_max_pool2d

tests/python/relax/test_codegen_tensorrt.py:155–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153
154
155def test_tensorrt_max_pool2d():
156 @tvm.script.ir_module
157 class MaxPool:
158 @R.function
159 def main(data: R.Tensor((2, 8, 16, 16), "float32")):
160 with R.dataflow():
161 out = relax.op.nn.max_pool2d(data, pool_size=(2, 2), strides=(2, 2))
162 R.output(out)
163 return out
164
165 data = np.random.randn(2, 8, 16, 16).astype("float32")
166 patterns = [("tensorrt.nn.max_pool2d", is_op("relax.nn.max_pool2d")(wildcard()))]
167 _offload_and_compare(MaxPool, {}, patterns, data)
168
169
170def test_tensorrt_avg_pool2d():

Callers

nothing calls this directly

Calls 4

is_opFunction · 0.90
wildcardFunction · 0.90
_offload_and_compareFunction · 0.85
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…