Repository navigation
Conversation
modelpath-dev
requested review from
loadams,
tjruwase and
tohtana
as code owners
September 18, 2026 07:51
delock
self-requested a review
September 20, 2026 07:21
Collaborator
|
Hi @modelpath-dev can you fix the DCO failure? Thanks! |
delock
reviewed
Sep 24, 2026
| rollout.generate(request, SamplingConfig(max_new_tokens=2, temperature=0.5, continuous_batch_size=1)) | ||
|
|
||
|
|
||
| def test_continuous_generation_rejects_shared_prefill(): |
Collaborator
There was a problem hiding this comment.
I don't think we need a test here. If there is behavior change, then this test will need change again, which is not desired.
Contributor
Author
There was a problem hiding this comment.
Makes sense, removed the test.
Raise ValueError when HybridEngineRolloutConfig.use_shared_prefill is set together with SamplingConfig.continuous_batch_size, instead of selecting the continuous path and silently ignoring shared prefill. Document the incompatibility in the inference-engine notes. Fixes deepspeedai#8458. Signed-off-by: Chandan Kumar <cml.codes@gmail.com>
modelpath-dev
force-pushed
the
fix/8458-reject-shared-prefill-continuous
branch
from
September 26, 2026 11:28
3b55a84 to
703abaa
Compare
Contributor
Author
|
@delock Fixed the DCO check. The PR is now one signed-off commit on top of master, and the test is removed as you suggested. |
delock
approved these changes
Sep 27, 2026
delock
enabled auto-merge
September 27, 2026 04:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
HybridEngineRollout.generateselects the continuous path wheneverSamplingConfig.continuous_batch_sizeis set, before any shared-prefill logic runs. WithHybridEngineRolloutConfig.use_shared_prefill=True, that flag was therefore ignored with no error. This PR rejects the combination explicitly, matching the approach already taken for CUDA graph capture on the continuous path.Fixes #8458.
Scope
HybridEngineRollout._validate_continuous_inputs: raiseValueErrorwhenuse_shared_prefillis enabled.docs/code-docs/source/inference-engine.rst: document that shared prefill and continuous batching cannot be combined.Out of scope: implementing shared-prefill semantics inside continuous batching.
Tradeoffs
Rejection over a compatible shared-prefill continuous mode. Continuous batching already requires
n_samples_per_prompt=1, so shared prefill has no clear benefit there today.Blast Radius
Only the experimental continuous path changes, and only when shared prefill is also requested. Default
generate()and shared-prefill-only configs are unchanged.Verification
Before the fix,
_validate_continuous_inputsaccepteduse_shared_prefill=Truewithcontinuous_batch_size=1(silent ignore). After the fix it raisesValueError: continuous batching does not support shared prompt prefill.