🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #1885

Bug#1151662: libggml0-backend-hip: HIP backend fails with `ROCm error: invalid device function`

#1885
From: Cordell Bloor
Date: Fri, 23 Oct 2026 21:00
66 lines
5576 bytes
Hi Francesco,

On 2026-10-23 10:09, Francesco Poli wrote:
> Does this also mean that I cannot (currently) use this integrated GPU
> for GPGPU computations? I haven't yet tried...

You can use your integrated GPU for GPGPU computations, though it may be 
more difficult. You have to build the code yourself rather than relying 
on Debian's prebuilt packages. That means no use of the rocblas, 
rocsparse, rocsolver, or rocrand packages. The rocfft and hipfft 
packages are purely based on run-time compilation, so they probably 
work. Similarly, header-only libraries like rocprim, rocthrust, and 
hipcub might be usable.

When libraries are built for the HIP language, the GPU code generated by 
the compiler is /native machine code/. This is unlike other GPU 
computational frameworks like Vulkan, OpenGL, or OpenCL, where 
application binaries generally either depend on run-time compilation 
(RTC) of shader sources, or ship an intermediate representation of the 
shaders (such as SPIR-V) and then JIT to native GPU code on the user's 
machine.

The HIP toolchain and runtime in Debian Testing and Unstable can build 
and run GPGPU programs and libraries for gfx90c. However, the prebuilt 
library and program packages included in Debian are not built for 
gfx90c. If the prebuilt libggml0-backend-hip and librocblas4 packages 
contained gfx90c machine code, then they would run on your system.

In any case, there are two main reasons why we don't build the Debian 
packages for gfx90c:

1. Upstream libraries like rocblas include a lot of compile-time and 
run-time if/else cases that branch on the detected gfx architecture, but 
the code is not written to handle gfx90c (as it is not on their official 
support list). To successfully build, we'd need to develop and maintain 
patches providing fallback code paths. I'd like to do that, but my time 
is limited.

2. The AMD ROCm packages are enormous on disk and they take an extremely 
long time to compile. Both size-on-disk and time-to-compile scale 
linearly with the number of architectures you build for. We're building 
for less than half of the potential architectures we could target but 
we're already running up against various limits in our tools and 
infrastructure.

> Your guess seems to be confirmed by the actual numbers.
> It seems that the Vulkan backend performs better.

Thank you for sharing. It's always nice to see actual benchmarks to 
confirm my suspicions.

> Also, if you have anything to comment about my comparison of Vulkan and
> CPU backends (why is `pp512` performance almost double, while `tg128`
> is only very slightly better), I would be very interested in hearing
> your take on that...

I'm afraid that I don't know enough to do anything but speculate. My 
suspicion would be that token generation gets little benefit from the 
APU hardware because it is memory-bound and it cannot be significantly 
optimized for that reason. Prompt processing, on the other hand, is 
compute-bound and there's more room for the Vulkan implementation to 
distinguish itself by making more efficient use of the APU hardware. 
However, this is nothing more than a guess.

Sincerely,
Cory Bloor
Technical Details
Message-ID: <NRuwO-7sPZ-13@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod
References: <NR5I5-7eBd-3@gated-at.bofh.it> <NRq9P-7qoS-5@gated-at.bofh.it> <NRq9P-7qoS-3@gated-at.bofh.it> <NR5I5-7eBd-3@gated-at.bofh.it> <NRq9P-7qoS-3@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From: Cordell Bloor <cgmb@slerp.xyz>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1151662: libggml0-backend-hip: HIP backend fails with `ROCm error: invalid device function`
Date: Fri, 23 Oct 2026 23:00:02 +0200
Message-ID: <NRuwO-7sPZ-13@gated-at.bofh.it>
References: <NR5I5-7eBd-3@gated-at.bofh.it> <NRq9P-7qoS-5@gated-at.bofh.it> <NRq9P-7qoS-3@gated-at.bofh.it> <NR5I5-7eBd-3@gated-at.bofh.it> <NRq9P-7qoS-3@gated-at.bofh.it>
X-Original-To: Francesco Poli <frx@free-vortex.org>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Fri Oct 23 20:57:11 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -0.941
Reply-To: Cordell Bloor <cgmb@slerp.xyz>, 1151662@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: debian-ai@lists.debian.org
X-Debian-Pr-Message: followup 1151662
X-Debian-Pr-Package: libggml0-backend-hip
X-Debian-Pr-Source: ggml
Old-X-Envelope-To: 1151662@bugs.debian.org
Old-X-Envelope-To: 1151662@bugs.debian.org
X-Mizu-Trace-ID: 8e38b560e6fcbd18
X-Migadu-Flow: FLOW_OUT
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Greylist: delayed 85244 seconds by postgrey-1.37 at buxtehude; Fri, 23 Oct 2026 20:54:50 UTC
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1998457
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 66
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: 1151662@bugs.debian.org
X-Original-Date: Fri, 23 Oct 2026 14:54:40 -0600
X-Original-Message-ID: <41251453-a7b3-43d5-92bc-e978cbd2aa7a@slerp.xyz>
X-Original-References: <179269342710.61208.13344734343148476284.reportbug@crunch> <17cdfaea-5362-4c0a-ab2a-32babe0719c0@slerp.xyz> <20261023180916.33b2e71a@crunch> <179269342710.61208.13344734343148476284.reportbug@crunch> <20261023180916.33b2e71a@crunch>