test(xla): validate Phase 4 families on IREE-Metal (macOS)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 12/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- compilers, machine-learning, testing-qa
Línea de trabajo
Start with the Phase 4 probes and gates named in the issue, then read src/lib/mlxcel-xla/src/emitter/builder.rs:166 to see why bf16 is rejected on IREE-Metal. Run the delta-rule probe on metal at f32 and f16 to check the 5e-5 bound, then record each family's gate results and any near-tie divergences in spike/openxla/FINDINGS_ssm.md. Done means all gates pass or divergences are documented, with the ROCm gates still green.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Part of #564
Problem / Background
Epic #564 brings SSM / hybrid / recurrent architectures to the OpenXLA/IREE backend. Design record: spike/openxla/SSM_HYBRID_DESIGN.md (written 2026-07-01; most symbol locations it cites have moved, use the ones in this issue, which were re-located on main at 56bfb92a, and re-verify them before editing). The Stage 2a spike-first pattern this follows is in spike/openxla/STAGE2_DESIGN.md and spike/openxla/FINDINGS_phase2a.md.
Phase 4 (delta-rule primitive #3352, Qwen3-Next / Qwen3.5 #3353, Kimi-Linear #3354, RWKV7 #3355, RecurrentGemma #3356) is validated on ROCm. IREE-Metal is a separate lowering target without bf16.
Goal
Every Phase 4 gate passes on metal at f32 and f16.
Scope
- Delta-rule probe first on
metal, then each family's gates on--device metalatMLXCEL_XLA_PRECISION=f32and=f16, same checkpoints and oracles as on ROCm. - Lowering fixes land here and must keep the ROCm gates green.
- Metal section in
spike/openxla/FINDINGS_ssm.md.
Acceptance Criteria
- Delta probe within 5e-5 on
metalat f32, both modes. - f32: each family's gates pass on
metal. - f16: the same; every divergence is a near-tie (top-2 gap below 0.01), listed in
FINDINGS_ssm.md.
Host and environment
Host: macOS on Apple Silicon only. bf16 cannot lower on IREE-Metal (src/lib/mlxcel-xla/src/emitter/builder.rs:166), so every gate runs twice, once with MLXCEL_XLA_PRECISION=f32 and once with MLXCEL_XLA_PRECISION=f16. The recurrent scan accumulation stays f32 on the f16 path; f16 runs pass when every divergence from the oracle is a near-tie (top-2 logit gap below 0.01, the epic's tolerance) and f32 runs are exact.
eval "$(scripts/iree/setup-macos.sh --env)"
export MLXCEL_XLA_DEVICE=metal
PY=spike/openxla/.venv/bin/python # or $MLXCEL_ORACLE_PYTHON
cargo build --release --features xla-iree --bin mlxcel --bin mlxcel-server
Dependencies
Blocked by #3352, #3353, #3354, #3355, #3356. State ABI under test: the generic StateTensorSpec list (all F32) threaded after the optional KV in prefill, held in util.globals for single-sequence decode, and carried at [B, ...] in ragged decode.
Risks
- f16 drift through matrix-valued delta state at long continuations.
User decisions that apply
- Metal is a validation unit for macOS only; lowering fixes land in this PR.
- Downloads are allowed. If
spike/openxla/.venvis missing, create it withuv venv --python 3.12 spike/openxla/.venvand install CPU torch and transformers as pinned inspike/openxla/requirements.lock(torch==2.12.1+cpu from the PyTorch CPU wheel index, transformers==5.12.1). Small HF-format checkpoints go intomodels/hf/<name>; confirm the exact HF repo id on the model page before downloading. Gated-licence models are skipped and reported unless the licence is already accepted on this account. - Families whose HF modeling code cannot run on CPU (Kimi-Linear, RWKV7, and Plamo2 if its remote code needs
mamba_ssm/causal_conv1d) use mlxcel's own MLX eager model as the oracle, following the pattern of thexla-reference-diagnosticsfeature examples (Cargo.toml:125,:570-575): run the MLX model greedily at temperature 0 on the same prompt and record its token ids in theoracle_continuation.pyJSON format soxla_oracle_checkandxla_batch_benchconsume it unchanged.
- Lenguaje dominante
- Rust
- Estrellas
- 505
- Forks
- 81
- Merge medio
- 14 h 2 min
- PR fusionados (30 d)
- 448
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lablup/mlxcel
-
area:core priority:high status:ready type:security
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
priority:medium status:ready type:security
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
area:models modeltype:text priority:medium status:in-progress type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 1 día
-
area:models priority:low status:ready type:test
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
area:models modeltype:omni priority:medium status:ready type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
Todos los issues de lablup/mlxcel
Issues similares
-
psmux-resurrect: restoring a session with a numeric name puts its windows into the wrong session (`new-window -t 4` is read as window 4)Posiblemente ocupada @ealwanlee la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
psmux/psmux-plugins#47 ·
-
Link Checker ReportAbiertoautomated issue report
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
ratatui/awesome-ratatui#598 ·
Los mantenedores suelen responder en 1 día
-
release
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
github/gh-aw-mcpg#17603 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
C-Bug S-Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bevyengine/bevy#26718 ·
Los mantenedores suelen responder en 2 días