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

Function test_prod

tests/python/relax/test_tvmscript_parser_op_statistical.py:161–173  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159
160
161def test_prod():
162 @R.function
163 def foo(x: R.Tensor((1, 2, 3, 4), "float32")) -> R.Tensor((1, 3, 4), "float32"):
164 gv: R.Tensor((1, 3, 4), "float32") = R.prod(x, axis=1)
165 return gv
166
167 x = relax.Var("x", R.Tensor((1, 2, 3, 4), "float32"))
168 bb = relax.BlockBuilder()
169 with bb.function("foo", [x]):
170 gv = bb.emit(relax.op.prod(x, axis=1))
171 bb.emit_func_output(gv)
172
173 _check(foo, bb.get()["foo"])
174
175
176def test_std():

Callers

nothing calls this directly

Calls 7

functionMethod · 0.95
emitMethod · 0.95
emit_func_outputMethod · 0.95
getMethod · 0.95
TensorMethod · 0.80
prodMethod · 0.80
_checkFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…