Skip to content

Commit

Permalink
Fix scale factor on flops profiler (#4500)
Browse files Browse the repository at this point in the history
  • Loading branch information
loadams authored Oct 11, 2023
1 parent 6c86ff3 commit a25a67a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deepspeed/profiling/flops_profiler/profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,9 @@ def _upsample_flops_compute(*args, **kwargs):

flops = input.numel()
if isinstance(scale_factor, tuple) and len(scale_factor) == len(input):
flops * int(_prod(scale_factor))
flops *= int(_prod(scale_factor))
else:
flops * scale_factor**len(input)
flops *= scale_factor**len(input)
return flops, 0


Expand Down

0 comments on commit a25a67a

Please sign in to comment.