mlx.data.Buffer.partition#
- Buffer.partition(self: mlx.data._c.Buffer, num_partitions: int, partition: int) mlx.data._c.Buffer #
Equivalent to slicing the buffer with a step equal to
num_partitions
and starting offset ofpartition
.This can be used for distributed settings where different nodes should load different parts of a dataset.