Skip to content

Commit

Permalink
profile with modules and stack
Browse files Browse the repository at this point in the history
  • Loading branch information
carmocca authored Feb 10, 2025
1 parent 49c6d6f commit ab8062c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions torchtitan/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def trace_handler(prof):
schedule=torch.profiler.schedule(wait=wait, warmup=warmup, active=active),
on_trace_ready=trace_handler,
record_shapes=True,
with_modules=True,
with_stack=True,
) as torch_profiler:
torch_profiler.step_num = global_step
yield torch_profiler
Expand Down

0 comments on commit ab8062c

Please sign in to comment.