Skip to content

Commit

Permalink
Update flops profiler to recurse (#4374)
Browse files Browse the repository at this point in the history
Fixes #4334.
  • Loading branch information
loadams authored Nov 21, 2023
1 parent a603a21 commit 6139122
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepspeed/profiling/flops_profiler/profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ def get_module_duration(module):
duration = module.__duration__
if duration == 0: # e.g. ModuleList
for m in module.children():
duration += m.__duration__
duration += get_module_duration(m)
return duration


Expand Down

0 comments on commit 6139122

Please sign in to comment.