Skip to content
Merged
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
11 changes: 10 additions & 1 deletion transformer_engine/pytorch/module/grouped_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -1696,6 +1696,15 @@ def forward(
f"does not match number of GEMMs ({num_gemms})."
)

if FP8GlobalStateManager.fp8_graph_capturing():
skip_fp8_weight_update = (
FP8GlobalStateManager.quantization_state.skip_fp8_weight_update_tensor
)
else:
skip_fp8_weight_update = None
if skip_fp8_weight_update is not None:
is_first_microbatch = False

# Preprocess input tensor
if isinstance(inp, QuantizedTensorStorage):
raise TypeError("GroupedLinear doesn't support input tensor in FP8.")
Expand Down Expand Up @@ -1754,7 +1763,7 @@ def forward(
is_grad_enabled,
weight_workspaces,
cache_weight,
None, # skip_fp8_weight_update
skip_fp8_weight_update,
self.save_original_input,
debug,
)
Expand Down
Loading