BasicStrategy#

class deepinv.distributed.strategies.BasicStrategy(img_size, tiling_dims, num_splits=None, **kwargs)[source]#

Bases: DistributedSignalStrategy

Basic distributed strategy with naive splitting along specified dimensions.

This strategy:
  • Splits the signal into blocks along specified dimensions

  • Processes patches individually (no batching)

  • Uses simple tensor assignment for reduction

Parameters:
  • img_size (Sequence[int]) – shape of the complete signal tensor.

  • tiling_dims (int | tuple[int, ...]) – dimensions along which to split. If int, tiles only that dimension.

  • num_splits (tuple[int, ...] | None) – number of splits along each dimension. If None, automatically computed. Default is None.

get_local_patches(x, local_indices)[source]#

Extract local patches without any special processing.

get_num_patches()[source]#

Return total number of patches.

reduce_patches(out_tensor, local_pairs)[source]#

Simple assignment of patches to output tensor.