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

Function alloc_and_shape

tests/python/relax/test_tvmscript_parser.py:2150–2153  ·  view source on GitHub ↗
(dtype: str)

Source from the content-addressed store, hash-verified

2148
2149 @R.macro(hygienic=True)
2150 def alloc_and_shape(dtype: str):
2151 alloc = R.builtin.alloc_tensor(R.shape([4, 4]), runtime_device_index=x, dtype=dtype)
2152 shape = R.shape_of(alloc)
2153 return shape
2154
2155 x = R.prim_value(1)
2156

Callers 1

funcFunction · 0.85

Calls 2

shape_ofMethod · 0.80
shapeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…