You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting ROCm working with llama.cpp (might need rocmwmma, and a recent patch that allows llama.cpp to be built with -DGGML_HIP_ROCWMMA_FATTN=1 (for flash attention)
All that's needed is installing the latest version of ROCm in Fedora Rawhide, and compiling llama.cpp with -DGGML_HIP=ON DAMDGPU_TARGETS="gfx1151" in addition to RPC if needed.
Allocating almost all memory to the iGPU split (using GTT) instead of the ~48 GB or so it seems to get by default. BIOS goes up to 96 GB, but amdttm.pages_limit and amdttm.page_pool_size go further. (See Increasing the VRAM allocation on AMD AI APUs under Linux.
llama.cpp tweaks:
Using --no-mmap and --no-warmup on RPC runs since that can add to the model loading time substantially (and mmap in particular can cause errors when the model filesize is too large to fit in one system's RAM.
Vulkan is already giving good results, but I believe efficiency on this APU can be increased substantially with some tweaks. Especially in a clustered configuration (which I'm investigating with llama.cpp RPC in #2).
I've gotten most things working on the Ryzen iGPU, and it's fast enough... but there are a few things that can make it go faster / harder (many mentioned in this Reddit thread on the Ryzen AI Max 395+ for LLM inference):
Getting ROCm working with llama.cpp (might needrocmwmma, and a recent patch that allows llama.cpp to be built with-DGGML_HIP_ROCWMMA_FATTN=1(for flash attention)-DGGML_HIP=ON DAMDGPU_TARGETS="gfx1151"in addition to RPC if needed.amdttm.pages_limitandamdttm.page_pool_sizego further. (See Increasing the VRAM allocation on AMD AI APUs under Linux.--no-mmapand--no-warmupon RPC runs since that can add to the model loading time substantially (andmmapin particular can cause errors when the model filesize is too large to fit in one system's RAM.Vulkan is already giving good results, but I believe efficiency on this APU can be increased substantially with some tweaks. Especially in a clustered configuration (which I'm investigating with
llama.cpp RPCin #2).