#1121902 rocm-hipamd: ROCm 6.4.3-4 OpenCL compiler regression: read_imageui undeclared on gfx900

#1121902#5
Date:
2025-12-04 12:59:54 UTC
From:
To:
Dear Maintainer,

I am reporting an OpenCL compiler regression affecting the gfx900 (Vega)
architecture in the rocm-hipamd 6.4.3-4 package. This bug prevents multiple
OpenCL applications, such as Geekbench and SVP4, from compiling and running
their kernels.

*** Reporter, please consider answering these questions, where appropriate ***

* What led up to the situation?
The bug was introduced immediately after upgrading the ROCm stack in Debian
Testing to version 6.4.3-4 (src:rocm-hipamd). The previous version (presumably
6.4.2 or 6.3.x) did not exhibit this issue.

* What exactly did you do (or not do) that was effective (or ineffective)?
I attempted to run standard OpenCL workloads (specifically Geekbench's
"Background Blur" test and SVP4 video interpolation). These applications
utilize OpenCL image functions. The attempt was ineffective, as the
clBuildProgram() API call failed due to a compiler error.

* What was the outcome of this action?
The OpenCL kernel compilation failed with the error message below, indicating
that essential OpenCL C built-in image functions are treated as undeclared
identifiers by the compiler. This effectively renders OpenCL image support
unusable on the gfx900 device for this version.

* What outcome did you expect instead?
I expected the OpenCL kernels to compile and execute successfully, as the
device is reported to have "Image support: Yes" via clinfo, and these functions
(read_imageui/write_imageui) are standard OpenCL C features.

*** End of the template - remove these template lines ***
---
### Technical Details and Error Output
---

**Device Information (from clinfo/rocminfo):**
The affected device is an AMD Radeon RX Vega-based GPU (gfx900 architecture).

**Relevant clinfo Output Snippet:**
Device Name: gfx900:xnack-
Device Version: OpenCL 2.0
Image support: Yes

**Compiler Error Message (from Geekbench/Application Log):**
The failure occurs inside the ROCm Compute Manager (comgr) during kernel
compilation.
--- (Start of Error) --- Internal error message: clBuildProgram() failed: /tmp/comgr-[...] /input/CompileSource:26:39: error: use of undeclared identifier 'read_imageui' ... /tmp/comgr-[...] /input/CompileSource:30:3: error: use of undeclared identifier 'write_imageui' ... Error: Failed to compile source (from CL or HIP source to LLVM IR). --- (End of Error) --- **Potential Cause:** This appears to be a **compiler regression** in ROCm 6.4.3 where the compiler front-end for the gfx900 target is failing to load the internal headers/definitions for core OpenCL image built-in functions. Please prioritize fixing this critical regression for gfx900 users, potentially by backporting a fix or migrating to a more stable ROCm 7.x version. Thank you for your time. Best regards, Liu Eigi