Skip to content

Commit 7fc8d11

Browse files
SSYernarfacebook-github-bot
authored andcommitted
Add export_stacks option to pipeline benchmarking (#3234)
Summary: Pull Request resolved: #3234 Added a new configuration option `export_stacks=True|False` to the RunOptions dataclass in benchmark_train_pipeline.py. This option enables stack trace export during benchmark runs, which helps with performance analysis by providing detailed execution flow information. The exported stack traces can be used to identify bottlenecks and optimize critical paths in the training pipeline. Example stack trace output: {F1980460020} Reviewed By: aliafzal Differential Revision: D78749183 fbshipit-source-id: 0638105a522888c7929d53a3d4c31d16bbda7f11
1 parent 89e7771 commit 7fc8d11

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

torchrec/distributed/benchmark/benchmark_train_pipeline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ class RunOptions:
110110
sparse_lr: float = 0.1
111111
sparse_momentum: Optional[float] = None
112112
sparse_weight_decay: Optional[float] = None
113+
export_stacks: bool = False
113114

114115

115116
@dataclass
@@ -390,6 +391,7 @@ def _func_to_benchmark(
390391
func_to_benchmark=_func_to_benchmark,
391392
benchmark_func_kwargs={"model": sharded_model, "pipeline": pipeline},
392393
rank=rank,
394+
export_stacks=run_option.export_stacks,
393395
)
394396
results.append(result)
395397

0 commit comments

Comments
 (0)