Skip to main content

Python class

DistributedType

DistributedType​

class max.experimental.sharding.DistributedType(dtype, shape, mesh, placements)

source

Bases: Generic[T], ABC

Shared state and shard-shape logic for distributed type descriptors.

Not intended for direct use. See DistributedTensorType and DistributedBufferType.

Parameters:

dtype​

dtype: DType

source

local_types​

abstract property local_types: list[T]

source

The per-device types in mesh order.

mesh​

mesh: DeviceMesh

source

placements​

placements: tuple[Placement, ...]

source

rank​

property rank: int

source

The rank (number of dimensions) of the global tensor.

shape​

shape: Shape

source