Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/multimodal/host_preprocessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ mod export;
use super::qwen_vl::insert_qwen_vl_image_tokens;
use export::export_mlx_tensor;
use export::{
build_prepared_prefill, export_llava_prefill, export_qwen2_vl_prefill, usize_to_i32,
validate_embedding_shape, validate_processor_shape, validate_projected_shape,
validate_sequence_capacity,
build_prepared_prefill, export_llava_prefill, usize_to_i32, validate_embedding_shape,
validate_processor_shape, validate_projected_shape, validate_sequence_capacity,
};
// Only the `xla-iree` Qwen2-VL prefill path calls this, so importing it
// unconditionally leaves it unused in a default-feature build and `-D warnings`
// turns that into a hard error. The gate has to match the single call site.
#[cfg(any(feature = "xla-iree", test))]
use export::export_qwen2_vl_prefill;

/// Vision implementation selected for OpenXLA multimodal preprocessing.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
Expand Down
5 changes: 5 additions & 0 deletions src/multimodal/host_preprocessor_export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ pub(super) fn export_llava_prefill(
)
}

// Reachable in production only from the `xla-iree` Qwen2-VL prefill path, and
// exercised by the module tests regardless, so the gate carries `test` too.
// Without it a default-feature `cargo clippy --lib -- -D warnings` fails the
// build on `function is never used`.
#[cfg(any(feature = "xla-iree", test))]
pub(super) fn export_qwen2_vl_prefill(
logical_tokens: Vec<i32>,
merged: InputEmbeddings,
Expand Down