-
Notifications
You must be signed in to change notification settings - Fork 0
Add PyTorch profiler support to vllm_bench.sh #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds Torch Profiler support to the benchmarking workflow, including per-model/per-concurrency trace generation, environment export, and output management. Documents multi-tool profiling (Nsight Systems, Nsight Compute, PyTorch Profiler). Introduces a sample YAML config enabling Torch Profiler alone or combined with nsys, and updates README instructions accordingly. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant B as vllm_bench.sh
participant C as Config (YAML)
participant S as vLLM Server/Bench
participant TP as Torch Profiler
participant NS as Nsight Systems (nsys)
U->>B: Run benchmark with profiling config
B->>C: Read per-model settings
loop For each model
B->>B: Create model output dirs (incl. TORCH_PROFILER_DIR)
alt Torch Profiler enabled
B->>B: Export VLLM_TORCH_PROFILER_* env vars<br/>(record_shapes, profile_memory, with_stack, with_flops)
end
alt nsys enabled
B->>NS: Prepare nsys launch/start args
end
loop For each concurrency
B->>B: Set TORCH_PROFILE_FILE (per-concurrency)
B->>S: Invoke vllm bench [--profile] with model opts
par Profiling
S-->>TP: Collect PyTorch trace (json/pt)
opt If nsys enabled
S-->>NS: Record system trace (.qdrep)
end
end
end
B->>B: List generated Torch Profiler traces
end
B-->>U: Output paths and summary
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
remove unused params
816ccd4 to
8239c2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
README.md(2 hunks)configs/bench_torch_profiling.yaml(1 hunks)vllm_bench.sh(5 hunks)
Added support for running torch profiles