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

Function test_full_like

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

Source from the content-addressed store, hash-verified

50
51
52def test_full_like():
53 @R.function
54 def foo(x: R.Tensor((2, 3), "float16"), v: R.Tensor((), "float32")) -> R.Tensor(
55 (2, 3), "float16"
56 ):
57 gv: R.Tensor((2, 3), "float16") = R.full_like(x, v)
58 return gv
59
60 x = relax.Var("x", R.Tensor((2, 3), "float16"))
61 v = relax.Var("y", R.Tensor((), "float32"))
62 bb = relax.BlockBuilder()
63 with bb.function("foo", [x, v]):
64 gv = bb.emit(relax.op.full_like(x, v))
65 bb.emit_func_output(gv)
66
67 _check(foo, bb.get()["foo"])
68
69
70def test_ones():

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…