A small fix in do_bench_using_profiling (#155500)

Summary: Results: https://docs.google.com/document/d/1B_4rtiDFPH_jV3VpnqLPnInwDMpF7yX29G82UoJTcu8/edit?tab=t.0

Test Plan:
```
buck2 run mode/opt  -c fbcode.enable_gpu_sections=true ai_acceleration/float8/benchmarks/bench:bench_fp8_shapes_eval 2>&1 | tee output44.txt
```

Rollback Plan:

Differential Revision: D76298690

Pull Request resolved: https://github.com/pytorch/pytorch/pull/155500
Approved by: https://github.com/yoyoyocmu, https://github.com/nmacchioni
This commit is contained in:
Shuqi Yang
2025-06-11 20:06:19 +00:00
committed by PyTorch MergeBot
parent 1dd0b1d12b
commit 1b6772a90f

View File

@ -288,6 +288,8 @@ def do_bench_using_profiling(
for _ in range(n_warmup):
fn()
torch.cuda.synchronize()
with torch.profiler.profile(
activities=[
torch.profiler.ProfilerActivity.CUDA,