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

Function test_zeros_like

tests/python/relax/test_tvmscript_parser_op_create.py:115–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113
114
115def test_zeros_like():
116 @R.function
117 def foo(x: R.Tensor((2, 3), "float32")) -> R.Tensor((2, 3), "float32"):
118 gv: R.Tensor((2, 3), "float32") = R.zeros_like(x)
119 return gv
120
121 x = relax.Var("x", R.Tensor((2, 3), "float32"))
122 bb = relax.BlockBuilder()
123 with bb.function("foo", [x]):
124 gv = bb.emit(relax.op.zeros_like(x))
125 bb.emit_func_output(gv)
126
127 _check(foo, bb.get()["foo"])
128
129
130def test_arange():

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…