Skip to content

fix(multimodal): gate the Qwen2-VL prefill export on the feature that calls it - #961

Merged
inureyes merged 1 commit into
mainfrom
fix/pp-clippy-xla-iree-gate
Jul 30, 2026
Merged

inureyes merged 1 commit into
mainfrom
fix/pp-clippy-xla-iree-gate

Conversation

@inureyes

Copy link
Copy Markdown
Member

What breaks

Pipeline Parallel CI / 2-host logical fails on every PR that touches the pipeline-parallel paths. The pipeline-parallel step itself passes; only the trailing Clippy on PP modules step fails, and it fails on src/multimodal/, which such a PR typically does not touch at all.

export_qwen2_vl_prefill is imported at src/multimodal/host_preprocessor.rs and defined at src/multimodal/host_preprocessor_export.rs unconditionally, but its only non-test call site is inside a #[cfg(feature = "xla-iree")] block. The workflow runs cargo clippy -p mlxcel --lib --tests -- -D warnings with no features, so that call site compiles out, the import becomes unused, the function becomes dead, and -D warnings promotes 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; the test arm 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_prefill and function export_qwen2_vl_prefill is never used, and could not compile mlxcel (lib). After: Finished dev profile, clean.

The normal development configuration is unaffected: cargo clippy --release --lib --tests --features metal,accelerate is 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 on main, 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-toolchain pin in #954: pre-existing on main, 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.

… 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`.
@inureyes inureyes added type:bug Bug fixes, error corrections, or issue resolutions priority:high High priority area:models Model architectures, weights, loading, metadata status:done Completed labels Jul 30, 2026
@inureyes
inureyes merged commit 33671f5 into main Jul 30, 2026
5 checks passed
@inureyes
inureyes deleted the fix/pp-clippy-xla-iree-gate branch July 30, 2026 02:22
@inureyes inureyes self-assigned this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:models Model architectures, weights, loading, metadata 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.

1 participant