Suggest setting AMDGPU_TARGETS #4011
Closed
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.
Currently, when building llama.cpp with CMake and hipBLAS option, it will build for gfx900, gfx906, gfx908, gfx90a, gfx1030 if using 5.6.1 or older. And, build for gfx906 if using ROCm 5.7.0 or 5.7.1 (it is set to empty, but that will result in it building only for gfx906.
The former raised multiple issues that CMake build wasn't working for RDNA3 cards, and once ROCm 5.7.0 or 5.7.1 is available in popular linux distributions, it will surely raise issues for most AMD cards owner.
This issue was fixed upstream 3 days ago, it will do something similar to this suggestion.
It might be better to implement AMD GPU targets selection in CMakeLists.txt, using devices present in computer by default with an option to set GPU targets for package maintainers.
Also, I noticed that in Makefile, the way it select GPU targets probably doesn't work on a computer with multiple GPU that use different ISA.