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
10 changes: 10 additions & 0 deletions transformer_engine/pytorch/module/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,16 @@ def backward_dw(self):
for wgrad_accumulation_and_reduce_hook in self.wgrad_accumulation_and_reduce_hooks:
wgrad_accumulation_and_reduce_hook()

def get_backward_dw_params(self):
"""
Get the parameters for the backward weight gradient computation.
"""
params = []
params.append(noop_cat(self._get_weight_tensors()))
if self.use_bias:
params.append(noop_cat([getattr(self, name) for name in self.bias_names]))
return params

def is_debug_iter(self) -> bool:
"""
This function checks if the debug should be enabled for this layer.
Expand Down
Loading