Skip to content

Fix support for ROCm 7#11

Merged
Anbeeld merged 1 commit into
Anbeeld:mainfrom
acerspyro:main
May 13, 2026
Merged

Fix support for ROCm 7#11
Anbeeld merged 1 commit into
Anbeeld:mainfrom
acerspyro:main

Conversation

@acerspyro
Copy link
Copy Markdown

Overview

This fixes a regression that seems to stem from a1d3989 and 90bd5ea where HIP support wasn't implemented correctly.

Namely, HIP declares attr.type rather than attr.memoryType, so you would get a build failure on a ROCm-enabled build without || defined(GGML_USE_HIP).

Additionally, a bunch of #defines were missing from ggml/src/ggml-cuda/vendors/hip.h, again causing a build failure when ROCm-enabled.

Finally, for a reason that eludes me, we had a if (WIN32) guard in ggml/src/ggml-hip/CMakeLists.txt. These files should be included regardless of OS. The commit a1d3989 simply states "add win32 guard to preserve behavior on linux", but everything works fine with these patches, so idk. Maybe something's beyond me here 😅

Additional information

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure:
    DeepWiki was used to find the source of the problem. Some of the code provided comes from DeepWiki, but I have found the CMakeLists.txt fix myself and found all the areas that needed to have || defined(GGML_USE_HIP) added. I also tested that it Works on My Machine™️

@acerspyro acerspyro marked this pull request as ready for review May 13, 2026 04:41
@Anbeeld Anbeeld merged commit f1a7ed9 into Anbeeld:main May 13, 2026
1 check passed
@Anbeeld
Copy link
Copy Markdown
Owner

Anbeeld commented May 13, 2026

Seems legit, thank you! Also WIN32 guard seems like a bug. Did removing it help with TQ support on AMD?

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