Skip to main content

Python function

global_shape_from_local

global_shape_from_local()

max.experimental.sharding.global_shape_from_local(local_shape, mesh, placements)

source

Derives the global shape from one local shard’s shape and placements.

Parameters:

Returns:

The reconstructed global tensor shape.

Raises:

NotImplementedError – If placements contains a placement type other than Sharded, Replicated, or Partial.

Return type:

Shape