Skip to content

Commit

Permalink
Update profiler registration check (#6668)
Browse files Browse the repository at this point in the history
Resolves #5432.
  • Loading branch information
loadams authored Oct 25, 2024
1 parent 24285d6 commit 54903e0
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 @@ -115,7 +115,7 @@ def start_time_hook(module, input):
get_accelerator().synchronize()
module.__start_time__ = time.time()

if not hasattr(module, "__start_time_hook_handle"):
if not hasattr(module, "__start_time_hook_handle__"):
module.__start_time_hook_handle__ = module.register_forward_pre_hook(start_time_hook)

def end_time_hook(module, input, output):
Expand Down

0 comments on commit 54903e0

Please sign in to comment.