Fix support for ROCm 7#11
Merged
Merged
Conversation
Owner
|
Seems legit, thank you! Also WIN32 guard seems like a bug. Did removing it help with TQ support on AMD? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This fixes a regression that seems to stem from a1d3989 and 90bd5ea where HIP support wasn't implemented correctly.
Namely, HIP declares
attr.typerather thanattr.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 fromggml/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 inggml/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
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™️