Skip to content

Fix dtype-related RuntimeError when computing scaled global norm#5296

Closed
potamides wants to merge 1 commit intodeepspeedai:masterfrom
potamides:master
Closed

Fix dtype-related RuntimeError when computing scaled global norm#5296
potamides wants to merge 1 commit intodeepspeedai:masterfrom
potamides:master

Conversation

@potamides
Copy link

complete_grad_norm_calculation_for_cpu_offload can return a python int even though scaled_global_norm expects it to always return a python float which makes torch.norm fail with a RuntimeError.

complete_grad_norm_calculation_for_cpu_offload can return a python int
even though scaled_global_norm expects it to always return a python
float which makes torch.norm fail with a RuntimeError.
@tjruwase
Copy link
Contributor

@potamides, thanks for this PR. However, it is a duplicate of #5252.

@potamides
Copy link
Author

My bad, didn't notice that PR. Closing this one then.

@potamides potamides closed this Mar 18, 2024
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