Repository navigation
fix(multimodal): gate the Qwen2-VL prefill export on the feature that calls it - #961
Merged
Merged
Conversation
… calls it `export_qwen2_vl_prefill` was imported and defined unconditionally, but its only non-test call site sits inside `#[cfg(feature = "xla-iree")]`. The pipeline-parallel workflow runs `cargo clippy -p mlxcel --lib --tests -- -D warnings` with no features, so that call site compiles out, the import goes unused and the function goes dead, and `-D warnings` turns both into errors. The job fails on every PR that touches the pipeline-parallel paths, regardless of what the PR changes. The gate now matches the call site, plus `test` because the module tests exercise the function irrespective of features. Verified by reproducing the exact CI invocation locally: it failed with the two errors before the change and compiles clean after, while `clippy --release --lib --tests --features metal,accelerate` stays clean and the Qwen2-VL export tests still pass. This went unnoticed because the workflow is path-filtered to the pipeline-parallel modules and last ran on 2026-07-20, while the unconditional import arrived on 2026-07-24 in `edc0ebbb6`.
This was referenced Jul 30, 2026
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.
What breaks
Pipeline Parallel CI / 2-host logicalfails on every PR that touches the pipeline-parallel paths. The pipeline-parallel step itself passes; only the trailingClippy on PP modulesstep fails, and it fails onsrc/multimodal/, which such a PR typically does not touch at all.export_qwen2_vl_prefillis imported atsrc/multimodal/host_preprocessor.rsand defined atsrc/multimodal/host_preprocessor_export.rsunconditionally, but its only non-test call site is inside a#[cfg(feature = "xla-iree")]block. The workflow runscargo clippy -p mlxcel --lib --tests -- -D warningswith no features, so that call site compiles out, the import becomes unused, the function becomes dead, and-D warningspromotes both to errors.It went unnoticed because the workflow is path-filtered to the pipeline-parallel modules and last ran on 2026-07-20, while the unconditional import arrived on 2026-07-24 in
edc0ebbb6. The first PR to touch those paths since is where it surfaced.The fix
Gate the import and the definition on
any(feature = "xla-iree", test). The feature arm matches the single production call site; thetestarm is needed because the module tests exercise the function irrespective of features, and dropping them would trade a lint failure for lost coverage.Validation
Reproduced the exact CI invocation locally. Before: two errors,
unused import: export_qwen2_vl_prefillandfunction export_qwen2_vl_prefill is never used, andcould not compile mlxcel (lib). After:Finished dev profile, clean.The normal development configuration is unaffected:
cargo clippy --release --lib --tests --features metal,accelerateis clean, and the Qwen2-VL export tests still compile and pass. One unrelated test in that module,xla_loader_keeps_text_and_unqualified_vlm_image_capability_false, fails both before and after this change and also fails onmain, so it is out of scope here.Why this is filed as its own PR
It is a repository-wide unblock rather than part of any feature branch, and it is the second breakage of this shape found this week after the
dtolnay/rust-toolchainpin in #954: pre-existing onmain, invisible because a path filter or a feature gate kept any run from exercising the failing combination. The nightly verification job added in #953 targets exactly that blind spot.