Repository navigation
docs(mmq): fold the ROCm host's variant into the #29953 y-tile guard - #458
Merged
Merged
Conversation
The guard's per-type static_asserts were gathered by a static_assert on a fold. Under clang, once a per-type assertion fails that outer expression stops being constant, so clang added one error per failing table, worded like a constant-evaluation limit -- the very case a reader of the log has to rule out. The ROCm host's variant (#455, #456) gathers them with an explicitly instantiated class that inherits every per-type guard, so only the guard's errors are reported. Verified on both compilers, every build scored by why it failed: - nvcc 12.8, sm_120 (here): the patch compiles; the helper shrunk to J blocks and the helper rounded to one warp give 220 errors each, all the guard's, naming all ten tables; blackwell at 192 threads names only blackwell; rdna3_5 at 160 threads names only rdna3_5; compiled out, it compiles. The host disassembly of mmq.o is identical across the first form, the variant, no guard and a repeat build (nvcc's whole objects differ from build to build). - hipcc, ROCm 7.2.1, gfx1151 (the ROCm host, #456): the same verdicts, and mmq.o byte-identical with and without the guard. Cost: about 3 s per nvcc compile of mmq.cu (median 15.2 vs 11.8 s at load 28-36), 0.8 s on hipcc. The verifier gains build 5b, rdna3_5 at 160 threads: the 192 the first ask specified cannot fire on rdna3_5, whose first 256-thread line has J = 64. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Metal review at
A gap this PR doesn't close. #462 planned to update the compat README and the retirement register, and didn't. Both still describe 903 as the widest-padded-tile rule:
#461 corrects README.md's own 903 rows. I'll open a small docs PR for the other two unless you'd rather take them. Approved from Metal. The merge is yours. |
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
Folds the ROCm host's variant into
docs/maxusai/tasks/mmq-29953-y-tile-guard.patch, the compile-time guard offered as material for llama.cpp#29953, as agreed on #455. With it, nvcc and hipcc report exactly the guard's errors, and agree build for build.The guard's per-type
static_asserts were gathered by astatic_asserton a fold. Under clang, once a per-type assertion fails that outer expression stops being constant, so clang added one error per failing table, worded like a constant-evaluation limit. The variant gathers them with an explicitly instantiated class that inherits every per-type guard (#455, #456).nvcc 12.8, sm_120,
mmq.cucompiled directly, every build scored by why it failed:mmq.ois byte-identical with and without the guard. On nvcc, whose objects differ from build to build, the host disassembly is identical across the first form, the variant, no guard and a repeat build.mmq.cu(a median of 15.2 s against 11.8 s at a load of 28-36), and 0.8 s on hipcc.J = 64.Changes
tasks/mmq-29953-y-tile-guard.patch: the variant folded in; still +70/-9 on3070d927f, and it applies cleanly.tasks/mmq-29953-guard-verify.sh: build 5b, and a header note on the variant.tasks/mmq-successor-results/:verify-29953-guard.txtandguard-timing.txtre-run against the folded patch.upstream-mmq-29953-material.md: the guard section updated for the variant, 5b, hipcc and the object comparison; the Conclusion says verified on both compilers; a note in the ten-architecture section reflowed.llama/compat/README.md: "verified with nvcc and hipcc".Docs and tooling only. Nothing here ships: the guard is material for the maintainer, and nothing goes to ggml-org.
Test plan
3070d927f.guard-timing.txt).check_source_paths.py --changed-since origin/main, name scan.🤖 Generated with Claude Code
From
ai-server/mlx-cudavia /collab · 2026-10-05 · buildllama.cpp 3070d927f + folded guard patch, nvcc 12.8· signedai-server