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

Function test_std

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

Source from the content-addressed store, hash-verified

174
175
176def test_std():
177 @R.function
178 def foo(x: R.Tensor((1, 2, 3, 4), "float32")) -> R.Tensor((1, 3, 4), "float32"):
179 gv: R.Tensor((1, 3, 4), "float32") = R.std(x, axis=1)
180 return gv
181
182 x = relax.Var("x", R.Tensor((1, 2, 3, 4), "float32"))
183 bb = relax.BlockBuilder()
184 with bb.function("foo", [x]):
185 gv = bb.emit(relax.op.std(x, axis=1))
186 bb.emit_func_output(gv)
187
188 _check(foo, bb.get()["foo"])
189
190
191def test_scan():

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…