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

Function forward

tests/python/relax/test_frontend_nn_modules.py:35–44  ·  view source on GitHub ↗
(
        x: R.Tensor((3, 3), dtype="float32"),
        _io: R.Object,
    )

Source from the content-addressed store, hash-verified

33def test_relu():
34 @R.function
35 def forward(
36 x: R.Tensor((3, 3), dtype="float32"),
37 _io: R.Object,
38 ) -> R.Tuple(R.Tensor((3, 3), dtype="float32"), R.Tuple(R.Object)):
39 R.func_attr({"num_input": 2})
40 with R.dataflow():
41 relu: R.Tensor((3, 3), dtype="float32") = R.nn.relu(x)
42 gv1: R.Tuple(R.Tensor((3, 3), dtype="float32"), R.Tuple(R.Object)) = relu, (_io,)
43 R.output(gv1)
44 return gv1
45
46 mod = modules.ReLU()
47 tvm_mod, _ = mod.export_tvm(spec={"forward": {"x": spec.Tensor((3, 3), "float32")}}, debug=True)

Callers

nothing calls this directly

Calls 15

TensorMethod · 0.80
dataflowMethod · 0.80
outputMethod · 0.80
conv1dMethod · 0.80
conv1d_transposeMethod · 0.80
group_normMethod · 0.80
subtractMethod · 0.80
reluMethod · 0.45
siluMethod · 0.45
geluMethod · 0.45
permute_dimsMethod · 0.45
matmulMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…