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

Function annotate_sharding

python/tvm/relax/script/builder/distributed/ir.py:153–160  ·  view source on GitHub ↗
(
    value: Expr, device_mesh: py_str | DeviceMesh, placement: py_str | Placement
)

Source from the content-addressed store, hash-verified

151
152
153def annotate_sharding(
154 value: Expr, device_mesh: py_str | DeviceMesh, placement: py_str | Placement
155) -> Expr:
156 if isinstance(device_mesh, py_str):
157 device_mesh = _lookup_device_mesh(device_mesh)
158 if isinstance(placement, py_str):
159 placement = Placement.from_text(placement)
160 return _annotate_sharding(value, device_mesh, placement)
161
162
163def redistribute(

Callers

nothing calls this directly

Calls 2

_lookup_device_meshFunction · 0.85
from_textMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…