Skip to main content

Python class

Partial

Partialโ€‹

class max.experimental.sharding.Partial(reduce_op=ReduceOp.SUM)

source

Bases: Placement

Every device holds a partial result that must be reduced.

Cached per reduce_op, so Partial() is Partial() is True.

Parameters:

reduce_op (ReduceOp) โ€“ The reduction operation to apply. Defaults to sum.

Return type:

Partial

Returns a cached Partial instance for the given reduce_op.

reduce_opโ€‹

property reduce_op: ReduceOp

source

The reduction operation applied when combining partial results.