Add the support of variable dtypes of params and grads in capturable Fused Adam. - #3414
Open
ptrendx wants to merge 2 commits into
Open
Add the support of variable dtypes of params and grads in capturable Fused Adam.#3414ptrendx wants to merge 2 commits into
ptrendx wants to merge 2 commits into
Conversation
Fused Adam. Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
Member
Author
|
/te-ci |
for more information, see https://pre-commit.ci
Contributor
Greptile SummaryThe PR brings capturable FusedAdam to parity with its non-capturable mode by dispatching parameter and gradient element types independently.
Confidence Score: 5/5The PR appears safe to merge, with the mixed-dtype dispatch guarded by existing list validation and covered by capturable numerical tests. The changed kernels consistently use independently dispatched parameter and gradient types, preserve the optimizer’s moment and master-weight contracts, and introduce no accepted correctness or security failure. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
A["FusedAdam capturable step"] --> B["Parameter-dtype bucket"]
B --> C["Validate homogeneous parameter dtype"]
B --> D["Validate homogeneous gradient dtype"]
C --> E["Dispatch PARAM_T"]
D --> F["Dispatch GRAD_T"]
E --> G["Capturable Adam kernel"]
F --> G
G --> H["Update parameters and optimizer state"]
Reviews (1): Last reviewed commit: "[pre-commit.ci] auto fixes from pre-comm..." | Re-trigger Greptile |
13 tasks
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.
Description
Added support for the types of parameters and gradients to differ in FusedAdam(capturable=True) to get it to parity with non-capturable mode.
Fixes #3358
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: