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

Function test_tril

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

Source from the content-addressed store, hash-verified

142
143
144def test_tril():
145 @R.function
146 def foo(x: R.Tensor((2, 3, 4), "float32")) -> R.Tensor((2, 3, 4), "float32"):
147 gv: R.Tensor((2, 3, 4), "float32") = R.tril(x, k=2)
148 return gv
149
150 x = relax.Var("x", R.Tensor((2, 3, 4), "float32"))
151 bb = relax.BlockBuilder()
152 with bb.function("foo", [x]):
153 gv = bb.emit(relax.op.tril(x, k=2))
154 bb.emit_func_output(gv)
155
156 _check(foo, bb.get()["foo"])
157
158
159def test_triu():

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…