Skip to content

Conversation

@sfc-gh-truwase
Copy link
Collaborator

Correctly handle ds_grad_is_ready in ZeRO2

Signed-off-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>
@stas00
Copy link
Collaborator

stas00 commented Feb 3, 2026

Interesting, thanks for finding this, Tunji, so then we don't need the condition at:

if getattr(param, "ds_grad_is_ready", True):

as your added check will prevent it from ever being False at l1084

Signed-off-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>
Signed-off-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>
Copy link
Collaborator

@stas00 stas00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That fixes the issue, thank you, Tunji!

@stas00 stas00 enabled auto-merge (squash) February 3, 2026 19:52
@stas00 stas00 merged commit 0ccb2bb into master Feb 3, 2026
11 checks passed
@stas00 stas00 deleted the sfc-gh-truwase/z2_grad_is_ready_fix branch February 3, 2026 22:26
ksugama pushed a commit to ksugama/DeepSpeed that referenced this pull request Feb 9, 2026
Correctly handle `ds_grad_is_ready` in ZeRO2

---------

Signed-off-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>
Signed-off-by: Kento Sugama <kentosugama@protonmail.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants