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

Function test_full

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

Source from the content-addressed store, hash-verified

35
36
37def test_full():
38 @R.function
39 def foo(v: R.Tensor((), "int32")) -> R.Tensor((2, 3), "float32"):
40 gv: R.Tensor((2, 3), "float32") = R.full((2, 3), v, dtype="float32")
41 return gv
42
43 bb = relax.BlockBuilder()
44 v = relax.Var("v", R.Tensor((), "int32"))
45 with bb.function("foo", [v]):
46 gv = bb.emit(relax.op.full((2, 3), v, "float32"))
47 bb.emit_func_output(gv)
48
49 _check(foo, bb.get()["foo"])
50
51
52def test_full_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
fullMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…