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

Function test_zeros

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

Source from the content-addressed store, hash-verified

98
99
100def test_zeros():
101 @R.function
102 def foo(dumb_param: R.Tensor()) -> R.Tensor((2, 3), "float32"):
103 gv: R.Tensor((2, 3), "float32") = R.zeros((2, 3), "float32")
104 return gv
105
106 bb = relax.BlockBuilder()
107 dumb_param = relax.Var("dumb_param", R.Tensor())
108 with bb.function("foo", [dumb_param]):
109 gv = bb.emit(relax.op.zeros((2, 3), "float32"))
110 bb.emit_func_output(gv)
111
112 _check(foo, bb.get()["foo"])
113
114
115def test_zeros_like():

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…