ShardingSpec¶
- class onnx_ir.ShardingSpec(value=None, device=(), index_to_device_group_map=(), sharded_dims=())¶
How a single tensor is sharded and/or replicated across devices.
A spec describes the distribution of one input or output tensor of a node. The unsharded axes are implicitly replicated;
sharded_dimslists only the axes that are split.Added in version 1.0.0.
- Parameters:
value (Value | None)
index_to_device_group_map (tuple[IndexToDeviceGroupMapEntry, ...])
sharded_dims (tuple[ShardedDim, ...])
- index_to_device_group_map: tuple[IndexToDeviceGroupMapEntry, ...] = ()¶
- sharded_dims: tuple[ShardedDim, ...] = ()¶