| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add opt-in stage-level profiling for HybridEngineRollout, including prompt expansion, generation, post-processing, total latency, and tokens-per-second metrics. Add a single-accelerator OPSD benchmark with raw profiles and mean/p50/p95 summaries, together with unit tests and documentation. Signed-off-by: nathon-lee <leejianwoo@gmail.com>
Signed-off-by: nathon-lee <leejianwoo@gmail.com>
Signed-off-by: nathon-lee <leejianwoo@gmail.com>
There was a problem hiding this comment.
Here are some automated review suggestions for this pull request.
Reviewed commit: 138d1bd7fb
ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Sorry, something went wrong.
This reverts commit 11edff5. Signed-off-by: nathon-lee <leejianwoo@gmail.com>
Signed-off-by: nathon-lee <leejianwoo@gmail.com>
| Back | FazBrowse Home | New Git URL |
Summary
This PR adds opt-in stage-level profiling for HybridEngineRollout.
The profiling path measures rollout-level latency without changing the default execution behavior. It establishes a measurable baseline for the HybridEngine rollout investigations discussed in #8197.
Following maintainer feedback, the executable OPSD HybridEngine rollout benchmark has been moved to DeepSpeedExamples and is no longer part of this PR.
Companion benchmark PR:
<DEEPSPEED_EXAMPLES_PR_URL>
Motivation
OPSD-style workloads commonly generate multiple responses for each prompt. Before optimizing this path, we need a reproducible way to measure the rollout stages and determine where time is spent.
The initial profiling API records:
The executable benchmark that exercises this API across different prompt, response, batch-size, and sample-count combinations is maintained separately in DeepSpeedExamples.
Changes
Opt-in rollout profiling
This PR adds enable_profiling to HybridEngineRolloutConfig.
Profiling is disabled by default:
It can be enabled explicitly with:
When enabled, HybridEngineRollout records synchronized measurements for:
The profile also records:
Profiling remains disabled by default because accelerator synchronization affects normal execution performance.
The most recent measurement can be retrieved with:
When profiling is disabled, the normal rollout execution path and output behavior remain unchanged.
Correctness
The rollout now preserves a tokenizer pad_token_id of 0 instead of treating it as missing and replacing it with the EOS token.
Tests cover:
Companion benchmark
The executable OPSD HybridEngine rollout benchmark has been moved to DeepSpeedExamples following maintainer feedback:
<DEEPSPEED_EXAMPLES_PR_URL>
The companion benchmark supports configurable matrices for:
It reports:
The benchmark executes the largest effective batch first so HybridEngine initializes a sufficiently large inference workspace, while preserving the user-requested order in the output JSON.
Its initial validation scope is intentionally limited to:
The benchmark depends on the profiling API introduced by this PR.
Validation
Test environment:
Command:
Result:
The modified files also pass the repository pre-commit hooks, including:
The executable benchmark and its CPU-only tests are validated separately in the companion DeepSpeedExamples PR.
Scope
This PR introduces only opt-in rollout-level profiling and its DeepSpeed core correctness coverage.
It does not include an executable benchmark in the DeepSpeed core repository.
It does not attempt to optimize generation or attribute time to internal HybridEngine operations such as:
Those internal phases can be investigated separately after the profiling API and companion benchmark establish a reproducible baseline.
This PR does not modify the existing inference-cache lifecycle or claim to fix cache release and reacquisition behavior.
Related to #8197.