[ 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