core.distributed.fsdp.src.megatron_fsdp.experimental.countdown#

A self-resetting countdown.

Module Contents#

Classes#

Countdown

Countdown that automatically re-arms after reaching zero.

API#

class core.distributed.fsdp.src.megatron_fsdp.experimental.countdown.Countdown(initial_value: int)#

Countdown that automatically re-arms after reaching zero.

Initialization

Create a countdown starting at initial_value.

property initial_value: int#

Return the number of decrements in one countdown cycle.

decrement() bool#

Decrement and return whether the countdown completed this call.