Repository navigation
update(mla): absorb DeepSeek V2 by default on ROCm, add gfx1151 results - #3152
Merged
Merged
Conversation
Issue #3133 measured the 2026-11 MLA and prefill-memory changes on CUDA (#3149) and left ROCm unmeasured for lack of a host. On a gfx1151 host the composed absorbed path decodes 3.4% behind the decompressed layout at 512 tokens (median of five runs per arm), 17% ahead behind 2K and 65% ahead behind 16K, where the phase peak drops from 16.06 to 12.39 GB, with 0 decided disagreements in the teacher-forced trace, so #3102's switch rule holds there too. `mla::default_absorbs_on` now makes the unset `MLXCEL_MLA_ABSORBED` absorb on ROCm as well; the CPU backend and Metal with the fused kernel off keep the decompressed default. `kv_arch` already reads `mla::absorbed_enabled()`, so V2-Lite at 32K now estimates 972.0 MiB of KV instead of 8.44 GiB. Adds the gfx1151 decode, trace and prefill-peak results: GLM-4.7-Flash fits a 28K single pass in 21.13 GB where the pre-#3114 tree asks for 62.72 GB, prefills 3.0x faster with 2048-token chunks, and gpt-oss-20b stays unchanged as designed. Llama 4 Scout did not fit on the host and is not recorded.
11 tasks done
The gfx1151 record is the evidence behind the new ROCm default, so its provenance and its weakest cell have to stand on their own. The CSVs now carry the measured commit (`c27b86f4`) like the CUDA rows, section 7 says which binary produced the `inspect` rows, and the record lists the MLX pin and ROCm overlay commit. Section 4 notes the 26.43 GB gpt-oss branch run instead of presenting both arms as 26.21 GB, the GLM failure is recorded as an allocation rather than an inferred mask array, and the Gate section replaces `PENDING` with what actually ran: the two narrow suites pass and the full local `make verify-rocm-held` was stopped by the memory guard, so hosted CI carries the rest. The docs no longer say the composed path is level with or ahead at 512 tokens on ROCm; the measured median is 3.4% behind there, and the claim is now within a few percent at 512 and ahead from 2K. The top-level layout summary and the family table now name ROCm. Refs #3133
9 tasks done
Member
Author
CUDA check (GB10, sm_121, head
|
The full local gate did run: a second attempt with the job cap lowered to three passed every prerequisite and the workspace tests (192 binaries, 15,954 passed). The first attempt was the one the memory guard stopped, so the record now says both. Refs #3133
This was referenced Nov 18, 2026
inureyes
added a commit
that referenced
this pull request
Nov 18, 2026
Bumps every version-tracking workspace crate (mlxcel, mlxcel-core, mlxcel-mlx-pin, mlxcel-surgery, mlxcel-xla) to 0.9.0-beta.1 through `make bump-version` and syncs Cargo.lock. `make verify-versions` passes. Renames the Unreleased changelog section to v0.9.0-beta.1 and records the 190 commits since v0.8.1. The existing entries covered the MLA, prefill-memory and OpenXLA decode work; the section gains grouped bullets for background Responses, the qwen4_exp prompt-cache snapshots and the opt-in checkpoints, MiMo-V2.6, IndicOCR, YOLO11, compressed-tensors FP8, the OpenXLA CUDA GEMV and 31 fixes, plus Performance, Dependencies, CI/CD and Docs sections and the v0.8.1...v0.9.0-beta.1 compare link. The stale Known Issues entry that said DeepSeek V2 keeps the decompressed cache on CUDA and ROCm is removed, since #3149 and #3152 made the latent the default there, and the open issues (#3142, #3144, #2817, the qwen4_exp chained-hit rounding from #2975, and the fp16 fallback for quantized KV on MLA latents) are listed. Regenerates `recipes/registry/` with the 0.9.0-beta.1 snapshot and repoints CURRENT. The snapshot came from `mlxcel arch --json` on a debug build of this tree instead of the release build `make recipes-registry` runs; its output matches a release binary built from the same code apart from the version field. The only family delta from 0.8.1 is the new `mimo_v2_vlm` entry. Updates the release pointers: the README main-branch line with highlights for the DeepSeek V2 latent default and background Responses, the bug report placeholder, CITATION.cff, and the cluster note in `docs/distributed.md` and `cluster_handshake.rs`, since v0.8.1 and v0.9.0-beta.1 cannot share a cluster. SECURITY.md is unchanged because 0.8.x remains the supported stable line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue #3133 measured the 2026-11 MLA and prefill-memory changes on CUDA (#3149) and left ROCm unmeasured because no host was available. This adds the ROCm row on a
gfx1151host (Ryzen AI MAX+ 395, Radeon 8060S, 30 GiB unified memory) and lets the DeepSeek V2 default follow that measurement: withMLXCEL_MLA_ABSORBEDunset, a ROCm build now caches the MLA latent and runs absorbed decode on the composed path, which is the same rule #3102 and #3131 applied on Metal and #3133 applied on CUDA.Correctness (section 3)
ROCm has no fused absorbed-decode kernel, so
MLXCEL_MLA_ABSORBED=1takes the composed path.MLXCEL_TRACE_MLA_STATS=1printsabsorbed_composedfor every decode step andabsorbed_fused=0, on DeepSeek V2-Lite and on Kimi-VL (deepseek_v3, absorbed unconditionally).=1vs=0=0/=1Every disagreement sits where the reference's own top two were within 0.25 logits, which is the rounding class rather than a behaviour change. The unset default on the measured commit still resolved to decompressed and traced byte-identical to
=0, with onlydecompressedsteps, which is what made the switch a change to make rather than one already made.Decode throughput (section 4)
mlxcel-bench-decode, deepseek-v2-lite-chat-4bit-mlx,--ignore-eos, tg128, ABBA order with 60 s idle between runs.=0=1(composed)The 512 cell was measured twice: an initial pair read +5.6% with a 14% spread in the decompressed arm, so it was repeated five times per arm, which puts the composed path 3.4% behind. That is inside the "within a few percent" band the Metal default was switched under (-1.7% there, with the fused kernel), and the 17% and 65% gains at longer prompts plus a 3.7 GB smaller peak behind 16K make it a trade worth taking on this backend too.
Prefill peak memory (section 5)
GLM-4.7-Flash 2048-token chunks go from 25.26 to 20.53 GB, a 28K single pass that fails to allocate 62.72 GB on the pre-#3114 tree now fits in 21.13 GB, and
generateprefill drops from 919.2 s to 306.9 s (3.0x). gpt-oss-20b stays between 26.21 and 26.43 GB on both trees and its single pass fails on both (100.35 GB requested), as designed.Sizing
kv_archalready readsmla::absorbed_enabled(), so no sizing code changes: DeepSeek V2-Lite at 32K now estimates 972.0 MiB of KV instead of 8.44 GiB, which is whatmlxcel inspectprints on a ROCm build of this branch.src/execution/kv_arch.rsonly gains the ROCm reference in its module comment.Not covered here
Llama 4 Scout (about 61 GB of weights) does not fit this host's 30 GiB and is not recorded; the CUDA record covers #3117 and #3126 instead.
Test plan
make verify-rocm-held ROCM_JOBS="-j 3": every prerequisite passed (verify-env-var-docs,verify-fmt, workspace clippy with-D warnings, the ROCm smoke build/link/generate) and the workspace test run finished with 192 test binaries, 15,954 passed, 0 failed and 524 ignoredcargo test -p mlxcel-core --features rocm --lib mla::(61 passed, includingthe_default_absorbs_where_the_fused_kernel_runs_and_on_cuda_and_rocm)=0keeps the decompressed layout (8.44 GiB of KV, 21.10 GiB total)scripts/rocm_gpu_guard.sh --hold, no build during a throughput rundocs/benchmark_results/with the measured commit, the host, and per-run CSV rowsThe gate outranks the host's memory only with the job cap lowered: its default of 6 jobs ran the 30 GiB machine out of memory while building the test binaries, and the same gate passed at 3.
Changes during review
81a588d5records the results document's provenance to the standard the sibling CUDA record uses (a commit column indecode.csvandtrace.csv, the MLX pin and the ROCm overlay commit in Setup), replaces the gate section's placeholder with what was actually run, and qualifies two overstatements: the composed path at 512 tokens is within a few percent (ROCm is 3.4% behind, not level), and gpt-oss is a 26.21 to 26.43 GB range rather than a single figure.080edf70then records the completed gate, after the run was repeated at the lower job cap.Review also found a pre-existing gap that this PR does not fix: the DeepSeek V2 KV estimate models only an int8 decline, while the runtime declines every non-FP16 cache mode, so a turbo-quant cache can make the estimate undercount (the dangerous direction). Making absorption the default on ROCm makes that path reachable by default, so it is filed as #3153.
Refs #3133