Skip to content

bug(xla): packed int8 (MLXCEL_XLA_QUANT=packed) prefill invoke faults on metal-spirv #613

Closed

Description

@inureyes

Summary

The packed int8 weight path (MLXCEL_XLA_QUANT=packed, issue #568: resident ui32 weight + f16 scales/biases, dequantized in the StableHLO graph) compiles for the metal-spirv target but faults at runtime: on an M1 Ultra the prefill invoke returns IREE status 13 (IREE_STATUS_INTERNAL) from iree_runtime_call_invoke (xla_llama_prefill failed (status 13)). The graph lowers (no iree-compile error), so the fault is in the executed kernel, not codegen rejection. This path has only ever executed on the GB10 CUDA runtime; the Metal runtime failure is separate from the dequant-to-matmul fusion gate tracked by #574. Discovered in #575.

Ask

Root-cause the runtime fault (most likely the in-graph ui32 bit-unpack + affine dequant lowering to a metal-spirv kernel). Determine whether it is fixable in-tree (an emitter/representation change) or is upstream IREE metal-spirv behavior.

Acceptance

  • A documented root cause (which op / dispatch faults, and why) for the IREE_STATUS_INTERNAL at prefill on metal-spirv.
  • EITHER an in-tree fix that makes the packed path run token-exact on Metal (matching the CUDA token-exactness), OR a clear characterization as upstream IREE work plus a fail-fast guard so MLXCEL_XLA_QUANT=packed on Metal errors early with an actionable message instead of an opaque INTERNAL status.
  • Note: the packed/int8 bandwidth win is un-demonstrable on the compute-bound Metal decode regardless (per ADR 0004 and the feat: extend the fused low-precision path to the Metal target #575 f16 result), so the goal here is correctness/robustness on Metal, not throughput.

References

#575, #611, #568, #574, ADR 0004, src/lib/mlxcel-xla/csrc/xla_iree.c (xla_llama_prefill, iree_runtime_call_invoke), src/lib/mlxcel-xla/src/emitter/builder.rs (quant_in_graph).

Activity

  1. added
    area:inference
    type:bug
    priority:low
    status:ready
    on Jul 2, 2026
  2. self-assigned this
    on Jul 4, 2026
  3. added a commit that references this issue on Jul 30, 2026
    c800266
  4. added
    status:done
    and removed
    status:ready
    on Sep 6, 2026
  5. added a commit that references this issue on Oct 27, 2026
    5201c1c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:inferencepriority:lowstatus:donetype:bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions