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

Function expect

tests/python/relax/test_tvmscript_parser.py:2163–2171  ·  view source on GitHub ↗
(z: R.Tensor((4, 4), dtype="float32"))

Source from the content-addressed store, hash-verified

2161
2162 @R.function(private=True)
2163 def expect(z: R.Tensor((4, 4), dtype="float32")) -> R.Shape([4, 4]):
2164 alloc: R.Tensor((4, 4), dtype="float32") = R.builtin.alloc_tensor(
2165 R.shape([4, 4]),
2166 R.dtype("float32"),
2167 R.prim_value(2), # Make sure prim_value is 2
2168 )
2169 shape: R.Shape([4, 4]) = R.shape_of(alloc)
2170 shape_1: R.Shape([4, 4]) = shape
2171 return shape_1
2172
2173 _check(func, expect)
2174

Callers 1

Calls 5

TensorMethod · 0.80
ShapeMethod · 0.80
shape_ofMethod · 0.80
shapeMethod · 0.45
dtypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…