IndexToDeviceGroupMapEntry¶

class onnx_ir.IndexToDeviceGroupMapEntry(key, value=())¶

One entry of a ShardingSpec.index_to_device_group_map.

It maps a single key appearing in ShardingSpec.device to the group of real device indices that key stands for. This is how a shard is replicated across several devices: instead of naming one device, an entry in device names a group, and this map expands that group.

Added in version 1.0.0.

Parameters:
value: tuple[int, ...] = ()¶
key: int¶