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

Function test_relax_shape_to_tensor

tests/python/relax/test_tvmscript_parser.py:399–411  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

397
398
399def test_relax_shape_to_tensor():
400 @R.function
401 def foo(x: R.Shape((4, 4))):
402 tensor = R.shape_to_tensor(x)
403 return tensor
404
405 x = relax.Var("x", R.Shape((4, 4)))
406 bb = relax.BlockBuilder()
407 with bb.function("foo", (x,)):
408 tensor = bb.emit(relax.op.shape_to_tensor(x))
409 bb.emit_func_output(tensor)
410
411 _check(foo, bb.get()["foo"])
412
413
414def test_symbolic_shape():

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…