Package: release.debian.org Severity: normal Tags: trixie X-Debbugs-Cc: [email protected], [email protected] Control: affects -1 + src:rocm-hipamd User: [email protected] Usertags: pu
[ Reason ] There are two reasons for this proposed update. 1) The libamdhip64-5 and rocm-opencl-icd binary packages provided by src:rocm-hipamd are incompatible with libhsa-runtime64-1 (>= 6.4~). On Trixie, libamdhip64-5 and rocm-opencl-icd expect that any AMD GPUs detected on the system will only support a single GPU ISA. However, the libhsa-runtime64-1 interface for querying supported ISAs has always included the possibility of returning multiple values, despite the implementation only ever returning one. Starting in libhsa-runtime64-1 6.4.3+dfsg-1, the HSA runtime may sometimes return a second supported GPU ISA due to the introduction of 'generic' ISAs that are compatible with more than one GPU architecture. The libamdhip64-5 and rocm-opencl-icd libraries include a check during initialization that there is only one supported ISA and will fail to initialize if libhsa-runtime64-1 reports multiple supported ISAs. This check is unnecessary. The code in src:rocm-hipamd is structured to only use the first returned ISA, which is unchanged. If there is a 'generic' ISA, it will be ordered after the traditional ISA. Removing the unnecessary check makes libamdhip64-5 compatible with libhsa-runtime64-1 6.4.3+dfsg-1 and later, which will allow for libamdhip64-5 to be co-installable with potential backports such as libamdhip64-6. At the moment, libhsa-runtime64-1 has an unversioned Breaks field that could be limited to versions before 5.7.1-6+deb13u2 if the incompatibility were fixed. The libamdhip64-5 5.2.3-8 package on Bookworm has the same problem as the libamdhip64-5 5.7.1-6+deb13u1 package on Trixie, but there's little point in fixing Bookworm when it lacks the necessary packages required for building libhsa-runtime64-1 6.4.3+dfsg-1. I therefore do not advocate for updating Bookworm with this change. The fix was made upstream in ROCm 6.4 and the change is therefore already on unstable and testing in src:rocm-hipamd 6.4.3-1 and later. 2) The libamdhip64-6 transition revealed that autopkgtest dependencies in d/t/control are underspecified. The src:rocm-hipamd 5.7.1-6+deb13u1 autopkgtests directly invoke clang-17 and require functionality provided by rocm-device-libs-17, but they do not list clang-17 or rocm-device-libs-17 as autopkgtest dependencies. They list hipcc as a dependency and rely it to install clang-17 and rocm-device-libs-17. This reliance on transitive dependencies results in autopkgtest failures when src:rocm-hipamd autopkgtests are run with recent versions of hipcc, as it now depends on clang-21 instead of clang-17. The src:rocm-hipamd autopkgtests fail when they try to invoke clang-17 because it is not installed. It would be useful to be able to run the src:rocm-hipamd autopkgtests to evaluate the impact of backports and other updated packages with a newer hipcc. This problem was discovered during the libamdhip64-6 transition on unstable/testing and it has been fixed on unstable/testing for future transitions by specifying the clang and device-libs dependencies in d/t/control. [ Impact ] Without this fix, the "Breaks: libamdhip64-5" field specified on libhsa-runtime64-1 must remain unversioned. The main impact is that this hinders backports of ROCm packages, as it means that packages that have gone through ABI transitions and depend on newer versions of libhsa-runtime64-1 are not co-installable with the original packages shipped in Trixie. I'm unsure whether we will choose to do backports, but the status quo precludes them. Additionally, when upgrading from Trixie to Forky, all packages that still depend on libamdhip64-5 will be removed. That will mostly affect packages like librocblas0, librocblas0-tests, etc. that have undergone an ABI transition after the Trixie release. [ Tests ] The compatibility problem occurs during initialization, so the incompatibility is discovered quickly when running any application on Trixie that uses libamdhip64-5 or rocm-opencl-icd with libhsa-runtime64-1 (>= 6.4~). I've manually run a small selection of ROCm library tests that depend on libamdhip64-5 on a system with a Radeon VII GPU. I've tested combinations of the HIP Runtime and HSA Runtime with and without updates and the proposed backports for comparison. The logs for these tests are 62MB each, so I will follow up with a summary. Baseline: The trixie HSA Runtime and the trixie HIP Runtime pass. The proposed trixie-backport of the HSA Runtime and the trixie HIP Runtime fail. After this proposed update to src:rocm-hipamd: The trixie HSA runtime and the proposed-trixie-updates HIP Runtime pass. The proposed trixie-backport HSA Runtime and the proposed-trixie-updates HIP Runtime pass. The change to the autopkgtest dependencies was manually verified by running the src:rocm-hipamd autopkgtests. [ Risks ] The main part of this change is a cherry-pick of the upstream fix from ROCm 6.4. This should be relatively safe, as we are relaxing a restriction that should never be a encountered anyway when using the the packages available in Trixie. The fix for the autopkgtest dependencies is very safe. It explicitly lists a pair of packages as direct dependencies when they are already transitive dependencies. Nothing should change during normal execution of the autopkgtests. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable [ Changes ] 1. Remove check that each AMD GPU has only one supported ISA from libamdhip64-5 and rocm-opencl-icd. 2. Explicitly specify the autopkgtest dependency on clang-17 and rocm-device-libs-17 instead of relying on hipcc to install them. [ Other info ] N/A
diff -Nru rocm-hipamd-5.7.1/debian/changelog rocm-hipamd-5.7.1/debian/changelog --- rocm-hipamd-5.7.1/debian/changelog 2025-10-04 02:33:54.000000000 -0600 +++ rocm-hipamd-5.7.1/debian/changelog 2026-10-19 09:40:55.000000000 -0600 @@ -1,3 +1,14 @@ +rocm-hipamd (5.7.1-6+deb13u2) trixie; urgency=medium + + * Add clang-17 and rocm-device-libs-17 to autopkgtest dependencies + to ensure that the tests that invoke clang++-17 will continue to + pass once all rocm-hipamd dependencies have been updated to newer + versions of clang + * Add d/p/0042-support-generic-isas.patch to fix incompatibility + with libhsa-runtime64-1 (>= 6.4.3+dfsg-1) + + -- Cordell Bloor <[email protected]> Mon, 19 Oct 2026 09:40:55 -0600 + rocm-hipamd (5.7.1-6+deb13u1) trixie; urgency=medium [ Cordell Bloor ] diff -Nru rocm-hipamd-5.7.1/debian/patches/0042-support-generic-isas.patch rocm-hipamd-5.7.1/debian/patches/0042-support-generic-isas.patch --- rocm-hipamd-5.7.1/debian/patches/0042-support-generic-isas.patch 1969-12-31 17:00:00.000000000 -0700 +++ rocm-hipamd-5.7.1/debian/patches/0042-support-generic-isas.patch 2026-10-19 09:40:55.000000000 -0600 @@ -0,0 +1,30 @@ +commit 3387f48b5625a214bdfc1778ed080abaa5fc6504 +Author: Konstantin Zhuravlyov <[email protected]> +Date: Wed Oct 30 15:33:36 2024 -0400 + + SWDEV-428601 - Don't enforce 1 isa per device in rocm backend + + - Device can have multiple isas as per HSA spec + - First isa is most specific one, so this change is sort of a NOP + + Change-Id: Ib332af21745f2e6a7c25db8986bf7717501059bc + +Applied-Upstream: https://github.com/ROCm/clr/commit/3387f48b5625a214bdfc1778ed080abaa5fc6504 +Debian-Bug: https://bugs.debian.org/1118618 +diff --git a/rocclr/device/rocm/rocdevice.cpp b/rocclr/device/rocm/rocdevice.cpp +index 648dfd217..75687e755 100644 +--- a/rocclr/device/rocm/rocdevice.cpp ++++ b/rocclr/device/rocm/rocdevice.cpp +@@ -674,11 +674,6 @@ bool Device::create() { + pciDeviceId_); + return false; + } +- if (agent_isas.count != 1) { +- LogPrintfError("HSA device %s (PCI ID %x) has %u ISAs but can only support a single ISA", +- agent_name, pciDeviceId_, agent_isas.count); +- return false; +- } + + uint32_t isa_name_length = 0; + if (HSA_STATUS_SUCCESS != + diff -Nru rocm-hipamd-5.7.1/debian/patches/series rocm-hipamd-5.7.1/debian/patches/series --- rocm-hipamd-5.7.1/debian/patches/series 2025-10-04 00:30:45.000000000 -0600 +++ rocm-hipamd-5.7.1/debian/patches/series 2026-10-19 09:40:55.000000000 -0600 @@ -21,3 +21,4 @@ 0039-fix-roc-obj-help.patch 0040-self-sufficient-bf16-header.patch 0041-inline-bf16-functions.patch +0042-support-generic-isas.patch diff -Nru rocm-hipamd-5.7.1/debian/tests/control rocm-hipamd-5.7.1/debian/tests/control --- rocm-hipamd-5.7.1/debian/tests/control 2025-10-03 01:13:13.000000000 -0600 +++ rocm-hipamd-5.7.1/debian/tests/control 2026-10-19 09:40:55.000000000 -0600 @@ -1,3 +1,3 @@ Tests: clang, cmake-hip-config, cmake-hip-lang, g++, gcc, hipconfig, hipcc -Depends: @, cmake, make, gcc, g++, rocminfo (>= 5.7.1~) +Depends: @, cmake, make, gcc, g++, rocminfo (>= 5.7.1~), clang-17, rocm-device-libs-17 Restrictions: superficial, skippable

