partition

Contents

partition#

class brainpy.math.sharding.partition(x, sharding=None)[source]#

Partition the input arrays onto devices by the given sharding strategies.

Parameters:
  • x (Any) – Any input arrays. It can also be a PyTree of arrays.

  • sharding (Union[Sequence[str], Device, Sharding, None]) – The sharding strategy.

Returns:

The partitioned arrays. Notably, the