[GH-ISSUE #8762] AMD APU support degraded on Docker with new build scripts. #67744

Closed
opened 2026-05-04 11:32:49 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @rjmalagon on GitHub (Feb 1, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8762

What is the issue?

Somehow, the new cmake build innovations affect ROCM on AMD APUs. Before this change, I was capable of docker building for AMD APUS with few changes (ROCM version to 6.2.4), just before this commit, it works fine.

It's built now, but ROCM fails during execution.
I acknowledge that I have some trouble eye parsing this new dockerfile and cmake files, and maybe I am using the wrong docker build arguments.

Docker build command:
docker build -f Dockerfile --no-cache --build-arg TARGETARCH=amd64 --build-arg FLAVOR=rocm -t localhost/ollama-rocm:latest

About my hardware.
AMD Ryzen 7 7735HS with AMD RAdeon 680M APU, 96GB shared RAM (configured 48GB up to 80GB for APU via kernel options), 6.12 Linux kernel with GTT enable for ROCM.

Ollama log

time=2025-02-01T15:28:25.660Z level=INFO source=memory.go:356 msg="offload to rocm" layers.requested=-1 layers.model=29 layers.offload=29 layers.split="" memory.available="[48.0 GiB]" memory.gpu_overhead="0 B" memory.required.full="28.6 GiB" memory.required.partial="28.6 GiB" memory.required.kv="7.0 GiB" memory.required.allocations="[28.6 GiB]" memory.weights.total="19.2 GiB" memory.weights.repeating="18.1 GiB" memory.weights.nonrepeating="1.0 GiB" memory.graph.full="7.3 GiB" memory.graph.partial="9.0 GiB"
time=2025-02-01T15:28:25.660Z level=INFO source=server.go:186 msg="enabling flash attention"
time=2025-02-01T15:28:25.661Z level=INFO source=server.go:388 msg="starting llama server" cmd="/usr/bin/ollama runner --model /root/.ollama/models/blobs/sha256-e70f8fe961784414047b588f056d081199e03d9c45aab3e5aee2502f4aebfca4 --ctx-size 131072 --batch-size 512 --n-gpu-layers 29 --threads 6 --flash-attn --kv-cache-type f16 --parallel 1 --port 45687"
time=2025-02-01T15:28:25.661Z level=INFO source=sched.go:449 msg="loaded runners" count=1
time=2025-02-01T15:28:25.661Z level=INFO source=server.go:564 msg="waiting for llama runner to start responding"
time=2025-02-01T15:28:25.661Z level=INFO source=server.go:598 msg="waiting for server to become available" status="llm server error"
time=2025-02-01T15:28:25.671Z level=INFO source=runner.go:936 msg="starting go runner"
time=2025-02-01T15:28:25.671Z level=INFO source=runner.go:937 msg=system info="CPU : LLAMAFILE = 1 | CPU : LLAMAFILE = 1 | cgo(gcc)" threads=6
time=2025-02-01T15:28:25.671Z level=INFO source=runner.go:995 msg="Server listening on 127.0.0.1:45687"
load_backend: loaded CPU backend from /usr/lib/ollama/libggml-cpu-haswell.so

OS

Linux, Docker

GPU

AMD

CPU

AMD

Ollama version

0.5.7 @ 475333d commit

Originally created by @rjmalagon on GitHub (Feb 1, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8762 ### What is the issue? Somehow, the new cmake build innovations affect ROCM on AMD APUs. Before this change, I was capable of docker building for AMD APUS with few changes (ROCM version to 6.2.4), just before this commit, it works fine. It's built now, but ROCM fails during execution. I acknowledge that I have some trouble eye parsing this new dockerfile and cmake files, and maybe I am using the wrong docker build arguments. Docker build command: `docker build -f Dockerfile --no-cache --build-arg TARGETARCH=amd64 --build-arg FLAVOR=rocm -t localhost/ollama-rocm:latest ` About my hardware. AMD Ryzen 7 7735HS with AMD RAdeon 680M APU, 96GB shared RAM (configured 48GB up to 80GB for APU via kernel options), 6.12 Linux kernel with GTT enable for ROCM. Ollama log ``` time=2025-02-01T15:28:25.660Z level=INFO source=memory.go:356 msg="offload to rocm" layers.requested=-1 layers.model=29 layers.offload=29 layers.split="" memory.available="[48.0 GiB]" memory.gpu_overhead="0 B" memory.required.full="28.6 GiB" memory.required.partial="28.6 GiB" memory.required.kv="7.0 GiB" memory.required.allocations="[28.6 GiB]" memory.weights.total="19.2 GiB" memory.weights.repeating="18.1 GiB" memory.weights.nonrepeating="1.0 GiB" memory.graph.full="7.3 GiB" memory.graph.partial="9.0 GiB" time=2025-02-01T15:28:25.660Z level=INFO source=server.go:186 msg="enabling flash attention" time=2025-02-01T15:28:25.661Z level=INFO source=server.go:388 msg="starting llama server" cmd="/usr/bin/ollama runner --model /root/.ollama/models/blobs/sha256-e70f8fe961784414047b588f056d081199e03d9c45aab3e5aee2502f4aebfca4 --ctx-size 131072 --batch-size 512 --n-gpu-layers 29 --threads 6 --flash-attn --kv-cache-type f16 --parallel 1 --port 45687" time=2025-02-01T15:28:25.661Z level=INFO source=sched.go:449 msg="loaded runners" count=1 time=2025-02-01T15:28:25.661Z level=INFO source=server.go:564 msg="waiting for llama runner to start responding" time=2025-02-01T15:28:25.661Z level=INFO source=server.go:598 msg="waiting for server to become available" status="llm server error" time=2025-02-01T15:28:25.671Z level=INFO source=runner.go:936 msg="starting go runner" time=2025-02-01T15:28:25.671Z level=INFO source=runner.go:937 msg=system info="CPU : LLAMAFILE = 1 | CPU : LLAMAFILE = 1 | cgo(gcc)" threads=6 time=2025-02-01T15:28:25.671Z level=INFO source=runner.go:995 msg="Server listening on 127.0.0.1:45687" load_backend: loaded CPU backend from /usr/lib/ollama/libggml-cpu-haswell.so ``` ### OS Linux, Docker ### GPU AMD ### CPU AMD ### Ollama version 0.5.7 @ 475333d commit
GiteaMirror added the bug label 2026-05-04 11:32:49 -05:00
Author
Owner

@rjmalagon commented on GitHub (Feb 17, 2025):

I will close it. It was an issue with the differences between buildah and buildkit. I was able to correct my build scripts to use buildkit correctly with the current dockerfile.

If someone needs some info about how to use buildkit to build Ollama in non-conventional environments, don't doubt to reach me.

<!-- gh-comment-id:2662133052 --> @rjmalagon commented on GitHub (Feb 17, 2025): I will close it. It was an issue with the differences between buildah and buildkit. I was able to correct my build scripts to use buildkit correctly with the current dockerfile. If someone needs some info about how to use buildkit to build Ollama in non-conventional environments, don't doubt to reach me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#67744