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

Function get_region_coord

tests/python/tirx/test_layout.py:1553–1558  ·  view source on GitHub ↗
(u)

Source from the content-addressed store, hash-verified

1551 r_size = functools.reduce(operator.mul, [r[1] - r[0] for r in region])
1552
1553 def get_region_coord(u):
1554 coord = []
1555 for r in reversed(region):
1556 coord.append(u % (r[1] - r[0]))
1557 u //= r[1] - r[0]
1558 return coord[::-1]
1559
1560 def get_shape_coord(r_coord, region):
1561 return [region[i][0] + r_coord[i] for i in range(len(region))]

Callers 1

verify_sliceFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…