Skip to content

Commit

Permalink
remove pre/post process for profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
tohtana committed Oct 23, 2024
1 parent 9cf9f88 commit b5fd387
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions deepspeed/runtime/zero/compile/stage3_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,8 @@ def fw(gm, sample_inputs):
gm.recompile()

if debug_log:
nz3.start_forward()
mem_prof = MemoryProfilingInterpreter(gm)
mem_prof.run(*real_inputs)
nz3.end_forward()
if rank == 0:
mem_prof.dump(f"mem_prof_fwd_{graph_id}.csv")

Expand Down Expand Up @@ -310,10 +308,8 @@ def bw(gm, sample_inputs):
gm.recompile()

if debug_log:
nz3.start_backward(True)
mem_prof = MemoryProfilingInterpreter(gm)
mem_prof.run(*validated_inputs)
nz3.end_backward()
if rank == 0:
mem_prof.dump(f"mem_prof_bwd_{graph_id}.csv")

Expand Down

0 comments on commit b5fd387

Please sign in to comment.