Skip to content

pr-set: repin #378 and #264 for HIP 64-bit warp masks (ggml-org#31617) - #382

Merged
danielhanchen merged 1 commit into
masterfrom
pinset/hip-warp-masks
Nov 19, 2026
Merged

danielhanchen merged 1 commit into
masterfrom
pinset/hip-warp-masks

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Repins #378 and #264 so the prebuilt's ROCm legs build again. Merge together with #381, which fixes the CUDA and Windows CPU legs. Run 44572603522 (b12532-mix-c38e486) needs both.

The prebuilt is the aged upstream b#### tag plus the pins in scripts/unsloth/pr-set.json, merged in order. Each fix goes into the pin that carries the broken line, and this PR only moves the SHAs.

What broke

Upstream ggml-org#31617 ("CUDA/HIP: Refactor the use of _sync warp primitives", first in b12414) replaced the HIP __shfl_sync macros, which dropped the mask, with ROCm's native warp sync builtins. Those require a 64-bit lane mask. Any raw __shfl_sync(0xffffffff, ...) now fails amd_warp_sync_functions.h:277 (sizeof(MaskT) == 8). The last release, b12347, predates that PR.

pin file upstream PR that broke it fix new SHA
#378 Inkling 1 ggml-cuda/fattn-banded.cu (1 call) ggml-org#31617 ggml_cuda_shfl(score, 0, WARP_SIZE) e2a5260
#264 MoE prompt kernels ggml-cuda/mmid.cu (3 calls) ggml-org#31617 merge b12532 into the branch, then ggml_cuda_shfl / ggml_cuda_shfl_up (what upstream did to its own lines in this file); base retargeted to base/upstream-08c252e22 0f27e48

The CI log only showed fattn-banded.cu, because ninja stops at the first failed object. mmid.cu was the second break behind it.

Evidence

  • ROCm (TheRock 10.3.0a20261114, the version the failed run used), ggml-hip for gfx90a (wave64) and gfx1151, b12540 + all 25 pins:
    • Old SHAs: fattn-banded.cu.o and mmid.cu.o fail with the CI static_assert.
    • New SHAs: all 167 objects build and libggml-hip.so links.
  • CUDA codegen is unchanged: the cuobjdump -sass of fattn-banded.cu.o and mmid.cu.o (sm_100, CUDA 12.8) is identical for the old and new lines.
  • llama_pinset.py audit: 25/25 clean, feature-checks coverage ok.
  • llama_pinset.py sim --tags window: b12540, b12541, b12542, b12543, b12546, b12547 and b12548 are clean (merge, pin_contract, merge_checks).
  • b12549 refuses model: Add ffn_gate_up_exps scales - NVFP4 #377 (src/models/inkling2.cpp). This is the known upstream rewrite of model: Add ffn_gate_up_exps scales - NVFP4 #377's line (ggml-org#32429) and is unrelated to this change. b12549 ages in at 23:46Z, so a publish dispatched before then picks b12548 or older.
  • llama_pinset.py verify --cuda (B200), with this pr-set:
tag merge + contract + merge_checks CPU gate CUDA build MUL_MAT MUL_MAT_ID PAD GET_ROWS test-chat features CPU / GPU
b12540 (aged now) ok ok ok 2829/2829 1156/1156 37/37 361/361 pass 17/17, 17/17
b12548 (newest that merges) ok ok ok 2829/2829 1156/1156 37/37 361/361 pass 17/17 (*), 17/17

(*) The first CPU feature-matrix pass on b12548 hit one SIGBUS in test-llama-archs -a flint while four builds were sharing the host. The arch passed 3 of 3 standalone reruns, and a full CPU feature-matrix rerun on the same tree passed 17/17.

Upstream ggml-org#31617 (b12515+) enables HIP's native warp sync builtins, which
require a 64-bit lane mask. #378 (fattn-banded.cu) and #264 (mmid.cu)
passed a raw 0xffffffff and broke every ROCm leg; both now use the
ggml_cuda_shfl helpers, CUDA codegen unchanged.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T19:15:58.611262Z bf063b9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen
danielhanchen merged commit 0bf26f2 into master Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant