DistributedTensor#

class cuquantum.tensornet.experimental.distributed.DistributedTensor(
local,
distribution: BlockCyclic,
global_shape: Sequence[int] | None = None,
)[source]#

Non-owning local shard bundled with a block-cyclic distribution and the tensor’s global shape.

The global shape is part of the tensor’s specification: a single rank’s local shard plus the distribution underdetermine it (e.g. a 4-row slab shard on rank 0 of 2 is consistent with global extent 7 and 8), so it is required at construction — either explicitly, or adopted from an already-bound distribution. The local shard is validated against it.

Warning

This API is experimental and subject to future changes.

Methods

__init__(
local,
distribution: BlockCyclic,
global_shape: Sequence[int] | None = None,
)[source]#
layout(
*,
rank: int | None = None,
) LocalTensorLayout[source]#

Return the compact local layout for this tensor’s global shape.

Attributes

distribution#

Private copy of the distribution associated with this tensor.

global_shape#

Global logical shape.

local#

Local array shard for the current process.