🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#1818
From: Francesco Poli
Date: Fri, 23 Oct 2026 16:20
135 lines
7407 bytes
--Sig_/qIxOHZ7OVUuwRgzhXPPTVZc
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Thu, 22 Oct 2026 15:12:52 -0600 Cordell Bloor wrote:

[...]
> Hi Francesco,

Hello Cordell,
thanks a lot for your kind reply!

>=20
> On 2026-10-22 12:23, Francesco Poli (frx) wrote:
> > $ llama-bench -hf MaziyarPanahi/Mistral-7B-Instruct-v0.3-GGUF
[...]
> > ROCm error: invalid device function
[...]
>=20
> The "invalid device function" error that you're seeing is the current=20
> ROCm way of saying "the library you're trying to use was not built
> for your GPU."=C2=A0The gfx90c architecture is not currently on the list
> of GPUs supported by ROCm math libraries in Unstable or Forky,
> because the "fallback architecture" patch we were using to enable
> gfx90c in ROCm 5 could not easily be carried over into ROCm 6 or
> later.

So, just to be sure I am understanding correctly: there's no variant of
libggml0-backend-hip built to target the gfx90c GPUs in the Debian
package, since the ROCm math libraries cannot (in current Debian
testing/unstable) made to support gfx90c architecture.

Does this also mean that I cannot (currently) use this integrated GPU
for GPGPU computations? I haven't yet tried...

> This was=20
> mentioned briefly in the NEWS for rocm-hipamd 6.4.3-1 [1]. There is a=20
> suggested workaround on the Supported GPU wiki page [2] (which also=20
> reminds me that the wiki has not yet been updated for Forky or
> current Unstable). For posterity, I'll repeat the suggestion here:
> try setting `export HSA_OVERRIDE_GFX_VERSION=3D9.0.0` in your
> environment to use the code objects built for gfx900 on your gfx90c
> GPU.

It works:

```
$ export HSA_OVERRIDE_GFX_VERSION=3D9.0.0
$ llama-bench -hf MaziyarPanahi/Mistral-7B-Instruct-v0.3-GGUF
ggml_cuda_init: found 1 ROCm devices (Total VRAM: 13977 MiB):
  Device 0: AMD Radeon Graphics, gfx900:xnack+ (0x900), VMM: no, Wave Size:=
 64, VRAM: 13977 MiB
load_backend: loaded ROCm backend from /usr/lib/x86_64-linux-gnu/ggml/backe=
nds0/libggml-hip.so
load_backend: loaded CPU backend from /usr/lib/x86_64-linux-gnu/ggml/backen=
ds0/libggml-cpu-haswell.so
| model                          |       size |     params | backend    | n=
gl |            test |                  t/s |
| ------------------------------ | ---------: | ---------: | ---------- | -=
-: | --------------: | -------------------: |
| llama 7B Q4_K - Medium         |   4.07 GiB |     7.25 B | ROCm       |  =
-1 |           pp512 |         53.19 =C2=B1 0.06 |
| llama 7B Q4_K - Medium         |   4.07 GiB |     7.25 B | ROCm       |  =
-1 |           tg128 |          6.90 =C2=B1 0.01 |

build: Debian (11669)
```

>=20
> I'm hoping we'll be able to get gfx90c working without needing those=20
> sorts of hacks for Forky, but I cannot make any hard promises. All I
> can say is that I will do my best. However, I'd be surprised if the
> HIP backend performs better than the vulkan implementation on gfx90c
> even if I get it working.

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

> I don't think upstream has done much rocblas kernel=20
> tuning for gfx90c=C2=A0(if any), but tuned kernels are vital for achievin=
g=20
> optimal performance on the ROCm BLAS stack.
>=20
> Sincerely,
> Cory Bloor
>=20
> [1]:=20
> https://salsa.debian.org/rocm-team/rocm-hipamd/-/blob/debian/6.4.3-1/debi=
an/NEWS?ref_type=3Dtags
> [2]:=20
> https://salsa.debian.org/rocm-team/community/team-project/-/wikis/Support=
ed-GPU-list#gfx90c


Thank you so much for your insight.
I am looking forward to hearing back from you (especially regarding my
question about GPGPU)!

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...

Thanks again for you time and patience!   :-)



--=20
 https://...?
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr =3D=3D CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

--Sig_/qIxOHZ7OVUuwRgzhXPPTVZc
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEygERR5zS79/7gjklPhwn4R9pv/4FAmrbhq0ACgkQPhwn4R9p
v/7dGA//fmh8N9ttmo9sIm01aCTt5yBs4xAB74ulF9tBxvCrBN+0AgxJEny3DGDg
71x5GZgn/dPAf5+uLGzOp8knV+WVxRkoMMSEUpg0jE2gwXKk4QEWgWdt+HjLkCNE
L9v+6pH3bZyS1FfsxCe3YdhKRXf+fw3k2T3YcxdnrkN8VXqzjVtwuitGFD/Law7w
5/WA6VlUmyM5bTM0Xe0OS+vWFIRG7ZDS3fzRwg26x6E1A4pUdkFlFWO9TWWsQyzb
XqEu4ENiw9E5dlIIWOvx/fkTpJZZAfAylwHn6SDSjQzPVgN9CrAjx4bu0mSEOUhr
imjIDIVtuipeb93nVGcOgsIkmPSuIN1vNJRIWpMvUiq5qBhlGnsp35KJ5Oe/zPj1
2JXSeJNUkfqp68odKkZwuMN25HeaotHOIbItmO5JZqUIhLVYBauYPdov3JSJ3dlN
+HH2G2XdI169CCM+WYc+yrSAkbROeedDxjeRtUd5AsMQa1ZdMfdtXtlLOCYKzq/R
lS3vxWNQwYcW0pavG1xyyMMx01u+feuiZDKFZDd1209RksmGMQCSMxUnE4yj4ZN/
E5UN37peBayU4ZwwCqc+VBi1t/sO7ZmhVlrFfarys2JuuPqK8N8JRYNINT0fdgTt
xD+k7LaC+nVJH7WSoO0w4Aaq9tKWd5yMZViAEREX78HJLIsaryc=
=+as/
-----END PGP SIGNATURE-----

--Sig_/qIxOHZ7OVUuwRgzhXPPTVZc--
Technical Details
Message-ID: <NRq9P-7qoS-3@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
References: <NR5I5-7eBd-3@gated-at.bofh.it> <NRq9P-7qoS-5@gated-at.bofh.it> <NR5I5-7eBd-3@gated-at.bofh.it> <NRq9P-7qoS-5@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.szaf.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Francesco Poli <frx@free-vortex.org>
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 18:20:01 +0200
Message-ID: <NRq9P-7qoS-3@gated-at.bofh.it>
References: <NR5I5-7eBd-3@gated-at.bofh.it> <NRq9P-7qoS-5@gated-at.bofh.it> <NR5I5-7eBd-3@gated-at.bofh.it> <NRq9P-7qoS-5@gated-at.bofh.it>
X-Original-To: Cordell Bloor <cgmb@slerp.xyz>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Fri Oct 23 16:11:09 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.45
Reply-To: Francesco Poli <frx@free-vortex.org>, 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
X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/qIxOHZ7OVUuwRgzhXPPTVZc";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Blackcat-Spam-Score: -16
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1998336
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 135
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 18:09:16 +0200
X-Original-Message-ID: <20261023180916.33b2e71a@crunch>
X-Original-References: <179269342710.61208.13344734343148476284.reportbug@crunch> <17cdfaea-5362-4c0a-ab2a-32babe0719c0@slerp.xyz> <179269342710.61208.13344734343148476284.reportbug@crunch> <17cdfaea-5362-4c0a-ab2a-32babe0719c0@slerp.xyz>