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_dims lists only the axes that are split.

Added in version 1.0.0.

Parameters:
device: tuple[int, ...] = ()¶
index_to_device_group_map: tuple[IndexToDeviceGroupMapEntry, ...] = ()¶
sharded_dims: tuple[ShardedDim, ...] = ()¶
value: Value | None = None¶