Skip to content

feat(xla): seed IREE sessions from prepared embeddings (#860) - #888

Merged
inureyes merged 1 commit into
mainfrom
feature/issue-860-iree-embeddings
Jul 23, 2026
Merged

inureyes merged 1 commit into
mainfrom
feature/issue-860-iree-embeddings

Conversation

@inureyes

Copy link
Copy Markdown
Member

Summary

  • load token prefill, prepared-embedding prefill, and decode as one fingerprinted IREE runtime bundle
  • seed single and continuous-batch sessions from owned prepared embeddings without losing logical token history
  • reject unsupported embedding inputs instead of silently falling back to token-only execution

Changes

  • add strict Rust materialization and a typed C descriptor ABI with repeated dtype, rank, shape, byte-count, capacity, slot, KV dtype, and overflow checks
  • share the device-to-device KV slot population path between token and embeddings prefill
  • retain prepared buffers through queueing and cancellation while tracking expanded cache length separately from logical IDs
  • support optional vendored printf archives and preserve local-task registration in CUDA-enabled pinned IREE builds
  • add canary, cancellation, slot-reuse, parity, and real-IREE integration coverage

Validation

  • cargo fmt --all -- --check
  • cargo clippy -p mlxcel-xla --lib --tests -- -D warnings
  • cargo check -p mlxcel-xla --lib --tests
  • cargo check --lib --tests --features xla-backend
  • cargo check -p mlxcel-xla --features iree --lib --tests
  • cargo test -p mlxcel-xla prepared::tests (4 passed)
  • cargo test -p mlxcel-xla batch::tests (10 passed)
  • pinned IREE 3.12.0rc local-task: cargo test --features xla-iree --test xla_prepared_prefill -- --ignored --nocapture (1 passed)

Closes #860

Compile token prefill, prepared-embedding prefill, and decode as one fingerprinted runtime bundle with a bounds-checked descriptor ABI.

Preserve logical token history across mixed batch queueing, cancellation, and slot reuse while decoding from the expanded cache length.

Add focused validation plus a real local-task IREE parity gate for single and continuous-batch paths.

Refs #860
@inureyes inureyes added status:done Completed type:enhancement New features, capabilities, or significant additions priority:high High priority area:architecture Architecture and code structure changes area:core mlxcel-core: MLX FFI, primitives, KV cache, layers area:inference Generation, sampling, decoding (incl. speculative, DRY) labels Jul 23, 2026
@inureyes
inureyes merged commit 8b75cc5 into main Jul 23, 2026
4 checks passed
@inureyes
inureyes deleted the feature/issue-860-iree-embeddings branch July 23, 2026 04:55
@inureyes inureyes self-assigned this Aug 31, 2026
be-free-snowboy pushed a commit to freestylejs/snowbrain-mlxcel that referenced this pull request Oct 27, 2026
…ablup#888)

Compile token prefill, prepared-embedding prefill, and decode as one fingerprinted runtime bundle with a bounds-checked descriptor ABI.

Preserve logical token history across mixed batch queueing, cancellation, and slot reuse while decoding from the expanded cache length.

Add focused validation plus a real local-task IREE parity gate for single and continuous-batch paths.

Refs lablup#860
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:architecture Architecture and code structure changes area:core mlxcel-core: MLX FFI, primitives, KV cache, layers area:inference Generation, sampling, decoding (incl. speculative, DRY) priority:high High priority status:done Completed type:enhancement New features, capabilities, or significant additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(xla): seed single and batched IREE sessions from embeddings

1 participant