mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-15 06:00:07 +00:00
[fp8] hotfix backward hook (#6053)
* [fp8] hotfix backward hook * [fp8] hotfix pipeline loss accumulation
This commit is contained in:
@@ -273,7 +273,7 @@ class OneForwardOneBackwardSchedule(PipelineSchedule):
|
||||
loss = criterion(output_obj, micro_batch) / self.num_microbatches
|
||||
|
||||
if accum_loss is not None:
|
||||
accum_loss.add_(loss.detach())
|
||||
accum_loss.add_(loss.data)
|
||||
if outputs is not None:
|
||||
outputs.append(tree_map_hf(detach, output_obj))
|
||||
return loss
|
||||
|
Reference in New Issue
Block a user