Repository navigation
fix(xla): keep the serve worker alive after recoverable request failures - #3637
Merged
Merged
Conversation
Report failed prefills to the affected request and retire all active rows after a failed decode. Preserve completed work from the same step and stop the worker on a fatal device error or three consecutive failed decode steps. Answer queued requests when the worker stops. Exercise recovery, slot reuse, and terminal responses with scripted worker tests and device fault injection.
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.
Summary
Report a recoverable prefill error to its requesting client and retire the affected batch after a recoverable decode error. Other requests can continue using the same worker. Stop on a fatal device error or three consecutive decode failures and deliver a terminal error to queued clients.
Add scripted worker coverage and injected dense and recurrent device tests for terminal responses, slot reuse, and recovery.
Verification
The OpenXLA worker suite passed all 21 tests, including request-local failure recovery and fatal queue draining. The dense suite passed all 8 tests and the recurrent suite passed all 7 tests on each of IREE local-task and HIP (gfx1151), with MLXCEL_REQUIRE_MODELS=1. The real Mamba2-130M checkpoint exercised the injected failure and recovery on both devices. Formatting and the whitespace check passed.
A live OpenXLA server rejected a 50-token prompt exceeding its 32-token context capacity, then returned HTTP 200 and two generated tokens for the next request. The server smoke used a temporary copy of the real Mamba2 config replacing its nonstandard Infinity literal with the largest finite double for strict JSON parsing.
After integrating the sliding-window and diffusion changes on main, forward the full sliding-window flag through the diffusion constructor, initialize the diffusion defaults in the sliding-window test fixture, and remove a redundant borrow in the server CLI parser test. All-target Clippy with xla-iree,test-utils and warnings denied passed.
Closes #3395