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

Function _to_concrete_shape

tests/python/relax/test_codegen_cutlass.py:192–210  ·  view source on GitHub ↗
(symbolic_shape, var_table=None)

Source from the content-addressed store, hash-verified

190
191
192def _to_concrete_shape(symbolic_shape, var_table=None):
193 if var_table is None:
194 var_table = {}
195
196 result = []
197 for dim in symbolic_shape:
198 if isinstance(dim, tuple):
199 result.append(_to_concrete_shape(dim, var_table))
200 continue
201
202 if not isinstance(dim, tvm.tirx.expr.Var):
203 result.append(dim)
204 continue
205
206 if dim not in var_table:
207 var_table[dim] = np.random.randint(10, 50)
208 result.append(var_table[dim])
209
210 return tuple(result)
211
212
213_vars = {

Callers 3

test_matmul_offloadFunction · 0.70
test_attention_offloadFunction · 0.70

Calls 2

tupleFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…