Skip to content

fix(server): handle PromptCacheWarmup in the OpenXLA worker - #1273

Merged
inureyes merged 1 commit into
mainfrom
fix/issue-1270-xla-prompt-cache-warmup
Aug 21, 2026
Merged

inureyes merged 1 commit into
mainfrom
fix/issue-1270-xla-prompt-cache-warmup

Conversation

@inureyes

Copy link
Copy Markdown
Member

Summary

Add the missing ModelRequest::PromptCacheWarmup arm to the OpenXLA serve worker, which currently makes every --features xla-iree build fail to compile.

#1154 introduced the variant and updated the three workers that match on ModelRequest, but not src/server/batch/xla_worker_admission.rs:

error[E0004]: non-exhaustive patterns:
  `model_provider::ModelRequest::PromptCacheWarmup { .. }` not covered
  --> src/server/batch/xla_worker_admission.rs:482:15

Only BatchScheduler owns a prompt cache, so the OpenXLA worker has no snapshot state to warm. It drops the job without touching admission state, the same way diffusion_worker.rs and florence2_worker.rs already do.

Why this was not caught

CI compiles only the default feature set. The whole module is behind #[cfg(feature = "xla-iree")] (src/server/batch/mod.rs), so no check run ever built it. #1270 tracks closing that coverage gap, which is the durable half of the problem; this PR is only the unblock.

Validation

On GB10 with eval "$(bash scripts/iree/setup-cuda.sh --env)":

command before after
cargo check --features cuda,xla-iree --lib E0004 passes
cargo check --features cuda --all-targets passes passes, no warnings

The two checks were run on this branch alone, with no other build sharing the working tree.

Closes #1270

CI builds only the default feature set, so breakage behind `xla-backend` and
`xla-iree` lands on `main` unnoticed. #1154 added the
`ModelRequest::PromptCacheWarmup` variant and updated the batch scheduler, the
diffusion worker, and the Florence-2 worker, but not the OpenXLA worker, so its
`match` is non-exhaustive and every `--features xla-iree` build fails:

    error[E0004]: non-exhaustive patterns:
      `model_provider::ModelRequest::PromptCacheWarmup { .. }` not covered
      --> src/server/batch/xla_worker_admission.rs:482:15

Only the BatchScheduler owns a prompt cache, so the OpenXLA worker has no
snapshot state to warm and drops the job without touching admission state, the
same way `diffusion_worker.rs` and `florence2_worker.rs` do.

Reproduce with `cargo check --features cuda,xla-iree --lib` after pointing the
build at an IREE distribution.
@inureyes inureyes added type:bug Bug fixes, error corrections, or issue resolutions priority:high High priority area:core mlxcel-core: MLX FFI, primitives, KV cache, layers status:review Under review labels Aug 21, 2026
@inureyes
inureyes merged commit 8e524c6 into main Aug 21, 2026
7 checks passed
@inureyes
inureyes deleted the fix/issue-1270-xla-prompt-cache-warmup branch August 21, 2026 10:44
inureyes added a commit that referenced this pull request Aug 21, 2026
`TECHNICAL_REPORTS/.keep-reports` opts this repository into tracking reports,
and the report is meant to land inside the squash merge rather than trail it.
These three merged without one, so they are added here after the fact.

The reports carry the parts that do not survive in a diff. #916's recorded
blocker was a TF32 artifact in the MLX oracle rather than an emitter defect,
and its gate had only ever run on a single-crop solid-color image. #1275's
first fix attempt shipped a redundant global linker flag until each half was
ablated separately. #1273 is trivial as a change and only interesting because a
compile error sat in `main` unseen, which is what #1270 tracks.

Both language versions are included, matching the existing convention.
@inureyes inureyes self-assigned this Aug 27, 2026
@inureyes inureyes added status:done Completed and removed status:review Under review labels Sep 6, 2026
be-free-snowboy pushed a commit to freestylejs/snowbrain-mlxcel that referenced this pull request Oct 27, 2026
)

CI builds only the default feature set, so breakage behind `xla-backend` and
`xla-iree` lands on `main` unnoticed. lablup#1154 added the
`ModelRequest::PromptCacheWarmup` variant and updated the batch scheduler, the
diffusion worker, and the Florence-2 worker, but not the OpenXLA worker, so its
`match` is non-exhaustive and every `--features xla-iree` build fails:

    error[E0004]: non-exhaustive patterns:
      `model_provider::ModelRequest::PromptCacheWarmup { .. }` not covered
      --> src/server/batch/xla_worker_admission.rs:482:15

Only the BatchScheduler owns a prompt cache, so the OpenXLA worker has no
snapshot state to warm and drops the job without touching admission state, the
same way `diffusion_worker.rs` and `florence2_worker.rs` do.

Reproduce with `cargo check --features cuda,xla-iree --lib` after pointing the
build at an IREE distribution.
be-free-snowboy pushed a commit to freestylejs/snowbrain-mlxcel that referenced this pull request Oct 27, 2026
…and lablup#1275

`TECHNICAL_REPORTS/.keep-reports` opts this repository into tracking reports,
and the report is meant to land inside the squash merge rather than trail it.
These three merged without one, so they are added here after the fact.

The reports carry the parts that do not survive in a diff. lablup#916's recorded
blocker was a TF32 artifact in the MLX oracle rather than an emitter defect,
and its gate had only ever run on a single-crop solid-color image. lablup#1275's
first fix attempt shipped a redundant global linker flag until each half was
ablated separately. lablup#1273 is trivial as a change and only interesting because a
compile error sat in `main` unseen, which is what lablup#1270 tracks.

Both language versions are included, matching the existing convention.
@inureyes inureyes added this to the 0.6 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:core mlxcel-core: MLX FFI, primitives, KV cache, layers priority:high High priority status:done Completed type:bug Bug fixes, error corrections, or issue resolutions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(ci): compile the OpenXLA feature combinations in CI

1 participant