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 layernorm grad sbp #10561

Merged
merged 1 commit into from
Nov 11, 2024
Merged

fix layernorm grad sbp #10561

merged 1 commit into from
Nov 11, 2024

Conversation

ShawnXuan
Copy link
Contributor

Fix SBP settings for LayerNormGradOp to ensure correct gradient aggregation for gamma_diff and beta_diff

Changes

  • Updated SBP strategy in LayerNormGradOp: Set gamma_diff and beta_diff to use PartialSum instead of Split to avoid dimension mismatches during distributed training.
  • Added consistency check for begin_norm_axis and begin_params_axis: Enforce equality to ensure proper alignment of normalization and parameter dimensions.

@ShawnXuan ShawnXuan merged commit dfe78fb into layer_norm_grad_npu Nov 11, 2024
11 of 21 checks passed
@ShawnXuan ShawnXuan deleted the fix_ln_grad_sbp branch November 11, 2024 02:22
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