Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Fix an issue in sync_amax #169

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions float8_experimental/float8_linear_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ def sync_float8_amax_and_scale_history(
# 1. in distributed contexts, syncs amax values across workers
#
if dist.is_initialized():
child.fp8_amax_x = fp8_amax_x_tensor[idx]
child.fp8_amax_w = fp8_amax_w_tensor[idx]
child.fp8_amax_dL_dY = fp8_amax_dL_dY_tensor[idx]
child.fp8_amax_x = fp8_amax_x_tensor[idx].clone()
child.fp8_amax_w = fp8_amax_w_tensor[idx].clone()
child.fp8_amax_dL_dY = fp8_amax_dL_dY_tensor[idx].clone()

#
# 2. adds the `amax` values to history
Expand Down