Skip to main content

Python class

DistributedTensorType

DistributedTensorType​

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

source

Bases: DistributedType[TensorType]

A symbolic type for a tensor distributed across a device mesh.

Analogous to TensorType for single-device tensors. Derives per-device TensorType objects via local_types.

When a SymbolicDim is sharded along a mesh axis, the local shard dimension becomes a new SymbolicDim named "{original}_{axis_name}". This keeps symbolic names short and debuggable while ensuring that sharding the same global dim on different axes produces distinct names.

Parameters:

local_types​

property local_types: list[TensorType]

source

The per-device TensorType objects in mesh order.