Skip to content
Open
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
8 changes: 7 additions & 1 deletion transformer_engine/debug/features/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ def get_reduction_params(tensor_name: str, tp_group: torch.distributed.ProcessGr
reduce_within_microbatch = tensor_name != "weight"
if tensor_name == "weight":
if TEDebugState.weight_tensor_tp_group_reduce:
reduction_group = tp_group
# Do not overwrite with `None`: in torch.distributed collectives
# group=None means the default/world process group.
if tp_group is not None:
reduction_group = tp_group
else:
# "Reduce in TP group" requested, but TP group is missing.
skip_reduction = True
else:
skip_reduction = True
return skip_reduction, reduction_group, reduce_within_microbatch
Expand Down
Loading