Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed

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