Repository navigation
Conversation
AMD's prebuilt ROCm 10 distribution cannot create a HIP stream on this host:
the runtime JIT-compiles its internal blit/stream-ops program at the first
hipStreamCreate and the link fails on __amd_streamOpsIncrement, which HIP then
reports as hipErrorOutOfMemory. It reproduces with a twenty-line HIP program on
both the 10.0.0 release and the 10.1.0a nightly.
Building the same therock-10.0 sources through nixpkgs' packaging fixes it, so
this vendors nixpkgs' rocm-modules tree and bumps it to ROCm 10. Roughly fifty
changes were needed across fourteen modules, nearly all of them nixpkgs
carrying assumptions that no longer hold:
* patches already merged upstream (verified per commit, not assumed)
* patches that cannot be ported: rocm-libraries#2073 was never merged and
ROCm 10 restructured TensileCreateLibrary around it, so hipblaslt now takes
joblib from the python environment instead
* new build requirements: python3 for the trap-handler and hipblas codegen,
git for shared/origami, amd_smi for hipblaslt and rocblas clients, libnl
and libmnl for amdsmi, rocprof-trace-decoder for rocprofiler-sdk
* layout changes: MIOpen's ClangToolChain.cmake assumes TheRock's single
prefix, so it is pointed at the split nix outputs
* a regenerated device-libs cmake patch and an esmi bump to the commit ROCm
10 pins, since the vendored 4.2 tag no longer matches the amdsmi API
MIOpen is built without Composable Kernel: nixpkgs marks CK broken without a
gfx9 target, and gufo only needs ck/ck.hpp headers, never a CK library.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019QUqxmu9mfE9RHMmAjUdAm
baseline.md pins the ROCm 7.2.3 reference sweep for Qwen3.8-27B UD-Q4_K_XL so any toolchain change can be compared against it. rocm10-spike.md is the investigation: what broke in AMD's tarball and why, the packaging work that fixed it, and the measurements that followed. The headline result is that clang 23 SLP-vectorizes the blocked WMMA GEMM inner loops past the 256-VGPR budget, so 67 of 214 instantiations spill where clang 22 spilled none, costing 16-19% of prefill. It also records what did not work, so it is not retried: min-register scheduling removes every spill and costs another 23%, CU mode looks good on paper and measures 10% worse, and the existing prefill tile choice is still the best of the six variants under the new compiler. The remaining decode gap is localized to the GEMV family with rocprofv3 and traced to a byte-load form change that no flag and no source rewrite could reach; that one is a candidate upstream report. hip_probe.cpp and rocm10-env.sh are the reproducers those documents reference. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QUqxmu9mfE9RHMmAjUdAm
Two changes to the quantized prefill path, measured on Qwen3.8-27B UD-Q4_K_XL at three repetitions. ROCm 10 ships AMD clang 23, whose SLP vectorizer widens the blocked WMMA GEMM inner loops past the 256-VGPR budget: 67 of 214 instantiations spill, 8570 VGPRs in total, against none under clang 22. Disabling SLP for that translation unit cuts it to 25 and 2183, and takes pp2048@d4096 from 373.50 to 461.16 t/s, which is 2.9% ahead of the 7.2.3 build rather than 16% behind it. The flag is scoped to the one file and gated on CMAKE_HIP_COMPILER_VERSION >= 23, so the pinned 7.2.3 toolchain is untouched by construction. The activation quantization used roundf, which needs the half-away-from-zero fixup sequence: 18 instructions against 10 for __float2int_rn. The intrinsic is worth about 0.9% of prefill on 7.2.3 and 1.1% on ROCm 10. That second change is not numerically free, since the intrinsic rounds ties to even instead of away from zero. Prefill agreement with sequential execution improves rather than degrades (max_abs_diff 0.5556 -> 0.4168, rmse 0.0951 -> 0.0794, cosine 0.99947 -> 0.99963), the shift is identical on both toolchains, and greedy output was unchanged on a sample prompt. Speculation here is documented as greedy-faithful, so this wants the full PR gate before it lands on main. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QUqxmu9mfE9RHMmAjUdAm
|
Could you try again with ROCm 10.1 ? https://rocm.blogs.amd.com/ecosystems-and-partners/rocm-10.1-blog/README.html |
|
Data from a ROCm 10.0.0 build of
|
|
I tasked an agent to re-measure ROCm 10.1.0 against the 7.2.3 pin on current SetupROCm 10.1.0 is not in nixpkgs, so I used the open nixpkgs PR 573885 at
Each pod ran The CWSR patch is gufo's Q4 prefill on A drifted down 1.2% between day one and day two. Q8 and decode did not drift. D ran on day one, so I compare it to A from day one. FIN ran on day two, so I compare it to A from day two. ResultsQwen3.8-27B, tokens per second.
This PR's hunksThe What slows 10.1 downI used
Checks
Not checked
I can share the work if needed, but it's local-only for now. Hope this helps! |
|
Closing in favor of #741 |
What this is
An evaluation of ROCm 10.0.0 on Strix Halo (gfx1151), the packaging work needed
to run it at all, and two measured changes to the Qwen prefill path.
Net position: the 7.2.3 pin should stay. ROCm 10 wins shallow prefill by
~3% and loses deep prefill by ~3.5% and decode by ~5%. This branch records the
evidence and lands the parts that are worth keeping regardless of when the pin
moves.
Commits
build(nix)— vendors nixpkgs'rocm-modulestree attherock-10.0.AMD's prebuilt tarball cannot create a HIP stream on this host (the runtime's
internal blit program fails to link
__amd_streamOpsIncrement, reported ashipErrorOutOfMemory); building the same sources through nixpkgs' packagingfixes it. ~50 changes across 14 modules.
docs(rocm)—baseline.md(7.2.3 reference sweep) androcm10-spike.md(the full investigation, including the dead ends).perf(qwen)— the two source/build changes below.Measured (Qwen3.8-27B UD-Q4_K_XL, 3 repetitions)
clang 23's SLP vectorizer widens the blocked WMMA GEMM inner loops past the
256-VGPR budget: 67 of 214 instantiations spill (8570 VGPRs) against none under
clang 22. Disabling SLP for that one file:
The flag is scoped to the file and gated on
CMAKE_HIP_COMPILER_VERSION >= 23,so the pinned 7.2.3 build is untouched by construction.
roundf→__float2int_rnin activation quantization (18 → 10 instructions)is worth +0.9% prefill on 7.2.3 (443.26 → 447.05) and +1.1% on ROCm 10.
Review focus
The rounding intrinsic changes numerics — ties round to even instead of away
from zero. Evidence gathered: prefill/sequential agreement improves
(
max_abs_diff0.5556 → 0.4168, cosine 0.99947 → 0.99963), the shift isidentical on both toolchains, and greedy output was unchanged on a sample
prompt. That is not a substitute for
nix build .#checks.x86_64-linux.pr, whichhas not been run here and should gate this before merge, since speculation
is documented as greedy-faithful.
Drafted for that reason. Splitting commit 3 out is easy if the numerics change
needs to wait.
Also recorded (negative results)
Min-register scheduling removes every spill and costs another 23%;
-mcumodelooks good on paper and measures 10% worse; the existing prefill tile choice is
still best of six under clang 23. The remaining decode gap is localized with
rocprofv3to the GEMV family and traced to a byte-load form change(
global_load_d16_u8→global_load_i8) that no compiler flag or sourcerewrite could reach — a candidate upstream clang report.
🤖 Generated with Claude Code
https://claude.ai/code/session_019QUqxmu9mfE9RHMmAjUdAm