Skip to content

fix(hip): Wave64 warp shuffle type mismatch#43

Merged
Anbeeld merged 1 commit into
Anbeeld:v0.3.0from
lithinnon:wave64-sync
May 31, 2026
Merged

fix(hip): Wave64 warp shuffle type mismatch#43
Anbeeld merged 1 commit into
Anbeeld:v0.3.0from
lithinnon:wave64-sync

Conversation

@lithinnon
Copy link
Copy Markdown

Overview

This PR fixes a compiler type mismatch on AMD ROCm/HIP systems when building for Wave64 architectures (GCN, CDNA, or RDNA targets compiled in Wave64 mode).

It appends the missing ULL (unsigned long long) suffix to two hardcoded warp sync masks in fwht.cu and mma.cuh, converting 0xFFFFFFFF to 0xFFFFFFFFULL. This matches the established ggml-cuda convention used throughout the rest of the repository and prevents compilation failures due to strict 64-bit mask type matching on Wave64 targets.

Additional information

This change brings these two outliers in line with standard conventions already used everywhere else in the codebase (such as in argmax.cu, common.cuh, and other sections of mma.cuh), which already use 0xFFFFFFFFULL universally.

It is fully backward-compatible with 32-bit NVIDIA CUDA and AMD Wave32 compilers, which implicitly downcast the literal safely.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES
    • How AI was used: Assisted in researching the Wave64 type signature requirements under HIP/ROCm and verifying matching conventions in the existing codebase.

@Anbeeld Anbeeld merged commit 8fd5a2a into Anbeeld:v0.3.0 May 31, 2026
1 check passed
@Anbeeld
Copy link
Copy Markdown
Owner

Anbeeld commented May 31, 2026

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants