You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: extend the fused low-precision path to the Metal target #575
Bring the #574 fused low-precision path to the Metal target (via the source-built Metal runtime from #571), validate token-exact-or-within-gate, and measure. This confirms the ADR 0004 transferability thesis: the same graph-level lever lands on a different IREE target without per-backend kernel authoring.
Metal validation needs an Apple-Silicon host; the epic work ran on GB10 (Linux/CUDA).
The transferable graph-level lever that IS realized, f16-resident weights (#572), already applies to every IREE target including Metal through the same emitter, so the ADR 0004 transferability thesis holds for it. Deferring this issue to a macOS session and to when upstream IREE lands the fused CUDA/Metal quantized-matmul.
f16-resident is 2.28x over f32 and token-exact for 64 greedy steps versus the f32 path per the #515 harness, so ADR 0004's transferability thesis holds on a second IREE target with no per-backend kernel work. bf16 does not lower on metal-spirv (the Metal GPU target has no bf16 compute). The packed int8 path compiles but the prefill invoke faults, and its bandwidth win is un-demonstrable on the compute-bound Metal decode regardless.
The fused quantized-matmul this issue set out to transfer does not exist in-tree (upstream IREE work, #573); it stays tracked by #574. Closing #575 on the realizable Metal scope. Full write-up plus the oracle-free xla_traj_dump gate are in #611 and ADR 0004.
Only the first part below is ready today; the fused-path transfer still waits on the upstream fusion (see the deferral note above and #573/#578).
Ready now — validate the realized lever on Metal:
make iree-metal — source-builds the Metal runtime (the build: Makefile targets to source-build the IREE runtime (CUDA + Metal) #571 recipe). This is its first real run: it was validated by inspection on Linux, not executed. If cmake configure fails on a missing submodule, apply the same fix pattern as the CUDA recipe (the benchmark / printf init is already in setup-macos.sh; spirv_cross should stay off since it is compiler-target-gated, but confirm on the real build).
eval "$(scripts/iree/setup-macos.sh --env)", then cargo build --release --features metal,accelerate,xla-iree.
Still blocked — the fused low-precision path:#574's fused quantized-matmul does not exist in-tree (upstream IREE work, #573/#578), and the same CUDA codegen gap applies to Metal. So the "transfer the fused path" half of this issue waits on upstream; the f16-resident transfer above is the part that confirms the transferability thesis now.
Activity
inureyes commentedon Jul 2, 2026
Deferred
This issue transfers the #574 fused low-precision path to the Metal target. Two blockers:
The transferable graph-level lever that IS realized, f16-resident weights (#572), already applies to every IREE target including Metal through the same emitter, so the ADR 0004 transferability thesis holds for it. Deferring this issue to a macOS session and to when upstream IREE lands the fused CUDA/Metal quantized-matmul.
docs(xla): validate #575 low-precision on Metal + oracle dumper (#611)
inureyes commentedon Jul 2, 2026
Done in #611.
On Metal (M1 Ultra, Llama-3.2-1B 4-bit, normal
mlxcel generatepath):metal-spirvINTERNAL)f16-resident is 2.28x over f32 and token-exact for 64 greedy steps versus the f32 path per the #515 harness, so ADR 0004's transferability thesis holds on a second IREE target with no per-backend kernel work. bf16 does not lower on
metal-spirv(the Metal GPU target has no bf16 compute). The packed int8 path compiles but the prefill invoke faults, and its bandwidth win is un-demonstrable on the compute-bound Metal decode regardless.The fused quantized-matmul this issue set out to transfer does not exist in-tree (upstream IREE work, #573); it stays tracked by #574. Closing #575 on the realizable Metal scope. Full write-up plus the oracle-free
xla_traj_dumpgate are in #611 and ADR 0004.feat(xla): fail fast on MLXCEL_XLA_PRECISION=bf16 for Metal targets (#…
inureyes commentedon Jul 2, 2026
Picking this up on a Mac (continuity notes)
Only the first part below is ready today; the fused-path transfer still waits on the upstream fusion (see the deferral note above and #573/#578).
Ready now — validate the realized lever on Metal:
make iree-metal— source-builds the Metal runtime (the build: Makefile targets to source-build the IREE runtime (CUDA + Metal) #571 recipe). This is its first real run: it was validated by inspection on Linux, not executed. If cmake configure fails on a missing submodule, apply the same fix pattern as the CUDA recipe (thebenchmark/printfinit is already insetup-macos.sh;spirv_crossshould stay off since it is compiler-target-gated, but confirm on the real build).eval "$(scripts/iree/setup-macos.sh --env)", thencargo build --release --features metal,accelerate,xla-iree.metalf16 token-exact vs f32, andmetalf16 faster than f32:MLXCEL_BACKEND=xla ./target/release/mlxcel generate -m <Llama-3.2-1B dir> -p "..." -n 48(f16-resident, default)MLXCEL_XLA_PRECISION=f32 MLXCEL_BACKEND=xla ./target/release/mlxcel generate ...(f32 reference)Still blocked — the fused low-precision path: #574's fused quantized-matmul does not exist in-tree (upstream IREE work, #573/#578), and the same CUDA codegen gap applies to Metal. So the "transfer the fused path" half of this issue waits on upstream; the f16-resident transfer above is the part that confirms the transferability thesis now.
docs(xla): validate lablup#575 low-precision on Metal + oracle dumper (…
feat(xla): fail fast on MLXCEL_XLA_PRECISION=bf16 for Metal targets (l…