Skip to content

ROCm build of llama.cpp is suboptimal for Strix Halo #2624

Description

@pwilkin

Platform

Linux/Ubuntu

Lemonade Version

10.9.0

GPU / APU Model

Strix Halo [Radeon Graphics / Radeon 8050S Graphics / Radeon 8060S Graphics]

Component

llama.cpp

Bug Description

The ROCm build for llama.cpp ships with -DGGML_HIP_ROCWMMA_FATTN=ON, which absolutely MURDERS long-context prefill on Strix Halo.

Steps to Reproduce

(venv) ilintar@piotr-strixhalo:/devel/tools/llama.cpp$ llama-bench -dev ROCM0 -d 0,30000 -hf ilintar/Ornith-1.0-35B-GGUF:IQ4_XS

ROCWMMA_FATTN = OFF

model size params backend threads dev test t/s
qwen35moe 35B.A3B Q4_K - Medium 17.57 GiB 34.66 B ROCm,Vulkan,BLAS 16 ROCm0 pp512 1152.00 ± 30.86
qwen35moe 35B.A3B Q4_K - Medium 17.57 GiB 34.66 B ROCm,Vulkan,BLAS 16 ROCm0 tg128 63.45 ± 0.45
qwen35moe 35B.A3B Q4_K - Medium 17.57 GiB 34.66 B ROCm,Vulkan,BLAS 16 ROCm0 pp512 @ d30000 626.35 ± 5.89
qwen35moe 35B.A3B Q4_K - Medium 17.57 GiB 34.66 B ROCm,Vulkan,BLAS 16 ROCm0 tg128 @ d30000 54.56 ± 0.23

ROCWMMA_FATTN = ON

model size params backend threads dev test t/s
qwen35moe 35B.A3B Q4_K - Medium 17.57 GiB 34.66 B ROCm,Vulkan,BLAS 16 ROCm0 pp512 1081.16 ± 9.02
qwen35moe 35B.A3B Q4_K - Medium 17.57 GiB 34.66 B ROCm,Vulkan,BLAS 16 ROCm0 tg128 63.23 ± 0.31
qwen35moe 35B.A3B Q4_K - Medium 17.57 GiB 34.66 B ROCm,Vulkan,BLAS 16 ROCm0 pp512 @ d30000 143.91 ± 0.65
qwen35moe 35B.A3B Q4_K - Medium 17.57 GiB 34.66 B ROCm,Vulkan,BLAS 16 ROCm0 tg128 @ d30000 42.18 ± 0.19

Expected vs Actual Behavior

Expected: ship both variants, add a switch for the variant and switch according to GPU
Actual: only the ON variant is shipped, resulting in terrible long-context prefill performance

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingengine::llamacppllama.cpp backend (LlamaCppServer); GPU/CPU LLM inference (Vulkan, ROCm, Metal)enhancementNew feature or requestpriority::😎warmruntime::rocmAMD ROCm runtime

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions