Debian Patches

Status for rocr-runtime/7.2.4+dfsg-1~exp1

Patch Description Author Forwarded Bugs Origin Last update
0001-link-to-drm_amdgpu.patch link to drm_amdgpu
libhsa-runtime64 uses some symbols from libdrm_amdgpu, such as
amdgpu_query_gpu_info.
Cordell Bloor <cgmb@slerp.xyz> no 2024-01-09
0002-remove-libhsa-amd-aqlprofile64.so-loading.patch remove libhsa-amd-aqlprofile64.so loading
During the initialization of libhsa-runtime64, the library will attempt
to load libhsa-amd-aqlprofile64.so. The aqlprofile library is an
optional proprietary extension for profiling and is therefore not
available in the Debian repos. The failure to find this library results
in the warning:

LoadLib(libhsa-amd-aqlprofile64.so) failed: libhsa-amd-aqlprofile64.so: cannot open shared object file: No such file or directory

There is not actually anything wrong or unexpected with this file being
missing, so this warning is not appropriate.
Cordell Bloor <cgmb@slerp.xyz> not-needed debian 2022-11-24
0003-expand-endian-detection.patch expand endian detection
The endianness detection logic in hsa/hsa.h fails on arm64 and ppc64el, which
leads to build failures in rccl on those platforms.
Cordell Bloor <cgmb@slerp.xyz> no debian 2024-03-15
0004-extend-isa-compatibility-check.patch extend isa compatibility check
There are a number of ISAs that are identical to each other, but are
not being treated as compatible by the upstream rocr-runtime. This
more sophisticated ISA compatibility check greatly reduces the number
of code objects that must be included in a binary in order to support
a wide variety of processors.

This change to the rocr-runtime is useless on its own, but when
combined with matching changes within rocclr and hipamd, it should
always load compatible kernels whenever possible, threreby replacing
the infamous HSA_OVERRIDE_GFX_VERSION variable for running compatible
binaries.
Cordell Bloor <cgmb@slerp.xyz> no 2022-07-13
0006-initialize-chip-revision.patch initialize chip revision
This patch fixes assertions on Rembrandt hardware. There are checks
that the chip revision is valid and will fail without this patch. I'm
not sure how this chip revision data gets initialized for other
architectures, but this is where the data is initialized for Rembrandt.
Cordell Bloor <cgmb@slerp.xyz> no debian 2024-03-17
On-non-x86-use-alternative-to-x86-intrinsic-__mm_pause.patch On non-x86, use alternative to x86 intrinsic __mm_pause
Cargo-culted from various other solutions that I could find.

Not forwarded yet, as this needs double-checking. For example, on my
first pass, I overlooked that this might also be built by MSVC.
Christian Kastner <ckk@debian.org> no 2024-10-18
0008-fix-pkgconfig-path.patch fix pkgconfig path
fix `pkgconfig` path
Xuanteng Huang <xuanteng.huang@outlook.com> not-needed 2024-08-18
0010-fix-missing-stdint.h.patch fix missing stdint.h
This file uses uint64_t but doesn't include the header that declares
that type, causing build failures with GCC 15.
Cordell Bloor <cgmb@debian.org> no debian 2025-09-12
0012-strip-x86-intrinsics-from-xdna-support.patch strip x86 intrinsics from xdna support Cordell Bloor <cgmb@debian.org> not-needed 2025-10-25
0013-fix-arm64-x86-intrinsics.patch Fix ARM64 build by adding alternatives to x86 intrinsics
The x86 intrinsics _mm_clflush, _mm_sfence, and _mm_mfence are not
available on ARM64. Add architecture guards to keep existing x86
behavior and provide ARM64 alternatives using std::atomic_thread_fence
for memory barriers and DC CIVAC instruction for cache line flush.
Talha Can Havadar <talha.can.havadar@canonical.com> invalid 2026-01-20
0016-update-hwloc-api-change-in-tests.patch Update hwloc API change in memory_async_copy test Reflect update of upstream hwloc API change since v2.0.0:
https://github.com/open-mpi/hwloc/blob/master/NEWS#L808
Bojan Aleksovski <bojan.aleksovski@canonical.com> yes 2026-04-03
0017-enable-building-rocrtst-as-part-of-rocr.patch Enable building rocrtst as part of rocr This change enables building rocrtst as part of the main ROCr source
tree alongside the runtime and libhsakmt components.

Previously, rocrtst was maintained within the source tree but intended
to be built as a separate project. This made it difficult to integrate
into Debian/Ubuntu packaging workflows, where all buildable components
must be produced from a single source package.

With this change:
- rocrtst can be built conditionally via the BUILD_ROCRTST option.
- It is integrated into the main CMake build alongside runtime and
libhsakmt.
- This allows autopkgtests to be executed against the built artifacts
without requiring a separate upstream build process.
- System-installed hsa-runtime64 can still be used when BUILD_ROCRTST
is disabled, preserving compatibility with external builds and/or
installations.

This change is intended to support Debian/Ubuntu packaging by ensuring
that rocrtst tests are built and runnable within the same source
package, enabling proper autopkgtest coverage.

[Talha Can Havadar]
Refresh for upstream 7.2.3

Notes:
- find_package(LLVM REQUIRED CONFIG) requires `llvm-dev` in
Build-Depends (provides LLVMConfig.cmake and the LLVM_LIBRARY_DIR
/ LLVM_VERSION_MAJOR variables used above).
- The previous patch's hunks targeting the upstream
AMDDeviceLibs_FOUND / HWLOC_FOUND blocks were dropped: those
blocks were introduced by patch 0015 (no longer in the series)
and never existed in the upstream tarball.
Bojan Aleksovski <bojan.aleksovski@canonical.com> yes 2026-05-19
0018-tests-data-path-via-env.patch rocrtst test suites use ENV for kernels path Allow overriding the base directory used to locate kernel object files
via the ROCRTST_KERNELS_PATH environment variable.
This enables running tests from autopkgtest or other environments.


diff --git a/rocrtst/common/base_rocr_utils.cc b/rocrtst/common/base_rocr_utils.cc
index 074ba83..93d23f8 100755
Bojan Aleksovski <bojan.aleksovski@canonical.com> yes 2026-04-03
0019-fix-test-verbosity-0.patch Fix test verbosity level 0 VERBOSE_MIN = 0 should disable all header prints, but it was printing
them anyway. This patch adds a check for the verbosity level before
printing the headers.
Forwarding is not needed as this fix is intended to prevent spamming
the autopkgtest output.


diff --git a/rocrtst/suites/test_common/test_base.cc b/rocrtst/suites/test_common/test_base.cc
index 47cc48e..e31f9de 100755
Bojan Aleksovski <bojan.aleksovski@canonical.com> not-needed 2026-04-03

All known versions for source package 'rocr-runtime'

Links