Distributed optimizer support for contiguous param buffer with FP8 params#1749
Merged
crcrpar merged 3 commits intoNVIDIA:masterfrom Nov 20, 2023
Merged
Distributed optimizer support for contiguous param buffer with FP8 params#1749crcrpar merged 3 commits intoNVIDIA:masterfrom
crcrpar merged 3 commits intoNVIDIA:masterfrom
Conversation
Signed-off-by: Tim Moon <tmoon@nvidia.com>
8 tasks
crcrpar
reviewed
Nov 17, 2023
Collaborator
crcrpar
left a comment
There was a problem hiding this comment.
would it be easily feasible to add a test case?
Contributor
Author
|
👍 Done |
8 tasks
Signed-off-by: Tim Moon <tmoon@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1723 added distopt infrastructure to support FP8 parameters in NeMo, but I found a bug with
contiguous_param_buffer=True. In the non-FP8 case, the local shards of the updated params are views into the contiguous buffer. The Adam kernel outputs to the buffer, we do in-place all-gathers, and the params are ready for fprop. However, the FP8 case should use a temporary buffer since the Adam kernel doesn't support FP8. The Adam kernel outputs to a temporary FP32 buffer and we cast to FP8 in the contiguous param buffer.