Skip to content

Commit ba456fd

Browse files
authored
[Megatron-FSDP] Fix incorrect gradient scaling target. (#3023)
Signed-off-by: Cory Ye <cye@nvidia.com>
1 parent 28c7221 commit ba456fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3177,7 +3177,7 @@ def _bucket_group_gradient_reduce(
31773177
# Scale gradients.
31783178
scaling_factor = gbuf.gradient_scaling_factor
31793179
reduce_op = gradient_reduce_preprocessing(
3180-
gbuf.data, scaling_factor, gbuf.ddp_config
3180+
bucket.data, scaling_factor, gbuf.ddp_config
31813181
)
31823182
if not gbuf.is_data_distributed:
31833183
# All-reduce the gradients on every rank. No scattering

0 commit comments

Comments
 (0)