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

Method main

tests/python/contrib/test_example_npu.py:72–83  ·  view source on GitHub ↗
(
        x: R.Tensor((1, 16, 32, 32), "float32"),
    )

Source from the content-addressed store, hash-verified

70
71 @R.function
72 def main(
73 x: R.Tensor((1, 16, 32, 32), "float32"),
74 ) -> R.Tensor((1, 16, 16, 16), "float32"):
75 with R.dataflow():
76 # First ReLU
77 y = relax.op.nn.relu(x)
78 # Max pooling
79 z = relax.op.nn.max_pool2d(y, pool_size=(2, 2), strides=(2, 2))
80 # Second ReLU
81 out = relax.op.nn.relu(z)
82 R.output(out)
83 return out
84
85
86@tvm.script.ir_module

Callers

nothing calls this directly

Calls 5

TensorMethod · 0.80
dataflowMethod · 0.80
outputMethod · 0.80
reluMethod · 0.45
max_pool2dMethod · 0.45

Tested by

no test coverage detected