Skip to content

hip : fix bf16 MFMA operand vector type for CDNA - #33086

Merged
JohannesGaessler merged 1 commit into
ggml-org:masterfrom
AngryLoki:hip-cdna-bf16-fix
Nov 26, 2026
Merged

JohannesGaessler merged 1 commit into
ggml-org:masterfrom
AngryLoki:hip-cdna-bf16-fix

Conversation

@AngryLoki

Copy link
Copy Markdown
Contributor

Overview

Follow-up to #30885, which fixed the bf16 WMMA path for RDNA3/RDNA4. The CDNA MFMA builtins __builtin_amdgcn_mfma_f32_16x16x16bf16_1k and __builtin_amdgcn_mfma_f32_16x16x8bf16 also take short vectors, so LLVM 23 rejects the __bf16 fragments for gfx908, gfx90a, gfx942 and gfx950. short works with older clang too.

Closes #33085

Additional information

  • ggml-hip builds for gfx908;gfx90a;gfx942;gfx950 with clang 23.1.6.
  • With clang 22, the generated code is the same for __bf16 and short.
  • Not run on CDNA hardware. The same change is used in Gentoo packages of ggml and whisper.cpp.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES - the fix is from my Gentoo patches; an AI assistant reproduced the errors, ran the build checks and drafted this text, which I reviewed.

Follow-up to ggml-org#30885: the CDNA MFMA bf16 builtins
also take short vectors, so LLVM 23 rejects __bf16 for gfx908, gfx90a,
gfx942 and gfx950.
@AngryLoki
AngryLoki requested a review from a team as a code owner November 26, 2026 06:29
@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning CUDA Related to the CUDA backend labels Nov 26, 2026
@JohannesGaessler
JohannesGaessler merged commit e087c6c into ggml-org:master Nov 26, 2026
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CUDA Related to the CUDA backend ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compile bug: CDNA (gfx908/gfx90a/gfx942/gfx950) fails to build with LLVM 23 in mma.cuh

3 participants