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

Auto scaling factor tuning for FP8 collective communication #41

Open
tocean opened this issue Apr 9, 2023 · 0 comments
Open

Auto scaling factor tuning for FP8 collective communication #41

tocean opened this issue Apr 9, 2023 · 0 comments

Comments

@tocean
Copy link
Contributor

tocean commented Apr 9, 2023

What would you like to be added:
Tune scaling factor automatically for fp8 collective communication.

Why is this needed:
Reduce the scaling factor to min value across all GPUs may cause underflow. What's more, the gradient reduced may not be the real average gradient.

Without this feature, how does current msamp work
In FP8Linear's backward, it synchronizes scaling factor's minimum value to all GPUs. And in optimizer's all_reduce_grads, it will synchronizes average gradient to all GPUs. It will first compute the sum, and then divides the sum by world size. When computing sum, it may cause overflow.

Components that may involve changes:

Brief description of your proposal if any:
Currently we do not have a perfect solution for this.

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

No branches or pull requests

1 participant