Debian Patches

Status for rocm-hipamd/5.7.1-3

Patch Description Author Forwarded Bugs Origin Last update
0005-clang-17.patch cram clang-17 into build paths Étienne Mollier <emollier@debian.org> yes 2024-03-02
0007-isystem-removal.patch -isystem breaks proper order of C and C++ include paths The addition of |-isystem "$HIP_CLANG_INCLUDE_PATH/.."| to HIPCXXFLAGS and
HIPCFLAGS needs to be removed from hipcc [1]. Once HIP is installed in /usr,
hipcc ends up passing -isystem /usr/include, which breakes the proper order of
C and C++ include paths. If I understand correctly, it's unnecessary for hipcc
to pass these flags anyway. A patch to remove them will eventually be made
upstream.
Cordell Bloor <cgmb-deb@slerp.xyz> yes 2024-02-27
0008-dotdots.patch adjust dotdots directories around _IMPORT_PREFIX Note the patch has been partially applied around ROCm 5.2, so there could be a
consistency issue if the below code were to not be necessary anymore.
Cordell Bloor <cgmb-deb@slerp.xyz> yes 2024-02-27
0011-enable-prevega.patch enable support for pre-Vega GPU. This eases testing of unsupported cards upstream; may be kept around in case
the debian project were to want to support those cards.
Étienne Mollier <emollier@debian.org> not-needed 2022-06-15
0015-default-hip-clang-path.patch HIP_CLANG_PATH: add check for clang in /usr/bin Cordell Bloor <cgmb@slerp.xyz> not-needed 2022-09-18
0020-replace-x86_64-with-variables.patch replace x86_64 with variables
The changes to hipcc.pl and hip_embed_pch won't allow cross-compiling,
but they will enable the build to proceed on other architectures.
Cordell Bloor <cgmb@slerp.xyz> yes upstream 2023-02-14
0022-fix-hip-config-for-c-projects.patch fix hip-config for c projects
When the CXX language is not enabled, then CMAKE_CXX_COMPILER_ID will
not be defined and (if unquoted) the left side of the comparison will
evaluate to nothing and therefore be a syntax error. Quoting the
variable ensures that even if the variable is undefined, the left side
of the comparison will be the empty string and therefore avoid a syntax
error.
Cordell Bloor <cgmb@slerp.xyz> no debian 2023-05-22
0023-make-hipcc-and-hipconfig-optional.patch make hipcc and hipconfig optional
The set_and_check macro is essentially just

set(var "${file}")
if(NOT EXISTS "${file}")
message(FATAL_ERROR ...)
endif()

so it can be made optional by first doing the exists check and only
doing the set if the file does exist.
Cordell Bloor <cgmb@slerp.xyz> no debian 2023-05-22
0025-improve-rocclr-isa-compatibility-check.patch improve rocclr 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 project. This more
sophisticated ISA compatibility check significantly 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 rocclr is useless on its own because there are multiple
places in the ROCm stack where kernels are checked for compatibility.
However, when combined with matching changes within rocr and hipamd,
this patch should allow HIP to load compatible kernels even when the
GFX ISA number is not an exact match.
Cordell Bloor <cgmb@slerp.xyz> no 2022-07-13
0026-extend-hip-isa-compatibility-check.patch extend hip 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 project. This more
sophisticated ISA compatibility check significantly 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 hipamd is useless on its own because there are multiple
places in the ROCm stack where kernels are checked for compatibility.
However, when combined with matching changes within rocr and rocclr,
this patch should allow HIP to load compatible kernels even when the
GFX ISA number is not an exact match. This should make it unnecessary
to use the HSA_OVERRIDE_GFX_VERSION variable.

The HIP runtime needed to be adjusted such that it considered all
compatible kernels and so that it could choose to load the best one,
rather than the original behaviour in which it was only possible for
there to be a single compatible kernel.

For binaries that are built for gfx900, gfx1010 and gfx1030, these
changes will enable compatibility with gfx902, gfx909, gfx90c, gfx1012,
gfx1031, gfx1032, gfx1033, gfx1034, gfx1035, and gfx1036.

I began working on this set of patches a week or two before my daughter
was born. In fact, I was working on them when I was interrupted by a
phone call from my wife informing me that it was time. My very patient
wife gave me a couple hours to wrap things up, but I did not quite
finalize the patch set before we had to leave for the hospital. The
days, weeks, and months that followed were a whirlwind of life changes
and it took me a very long time to get back to finish what I started.

This patch is dedicated to Adeline Bloor. Many people have been waiting
for this functionality, but nobody else had to wait for these patches
before they were born.
Cordell Bloor <cgmb@slerp.xyz> no 2022-07-25
0029-restrict-hiprtc-cmake-search-to-clang-17.patch restrict hiprtc cmake search to clang-17
Restrict the LLVM find_package search to clang-17 and ensure that the
search for clang prefers the same package found for LLVM. This is not
a problem for the upstream project, as it only ships one version of
clang.
Cordell Bloor <cgmb@slerp.xyz> not-needed 2023-06-27
0030-disable-immintrin-on-non-x86.patch disable immintrin on non-x86
The intrinsic-based implementation added in ROCm 5.7 doesn't work on
ppc64el or arm64. On those platforms, use the memcpy implementation
from ROCm 5.6.
Cordell Bloor <cgmb@slerp.xyz> no 2024-03-02
0031-find-package-minimum-policy.patch suppress find package minimum policy warning Cordell Bloor <cgmb@slerp.xyz> no 2024-03-02
0032-hipcc-compiler-launcher.patch [PATCH] Add HIP_CLANG_LAUNCHER for launching Clang through a wrapper executable Gavin Zhao <git@gzgz.dev> yes 2024-01-20
0033-fix-hipconfig-version-githash.patch fix hipconfig version githash
The HIP_VERSION_GITHASH may be the empty string in the hip version file,
rather than being entirely undefined. Treat that as 0, like was done in
the Debian-specific patches prior to the upstream fix.
Cordell Bloor <cgmb@slerp.xyz> no 2024-03-03
0034-default-to-hip-platform-amd.patch default to hip platform amd
The hipconfig executable is part of the hipcc package, so it is not
always available when building libraries that depend on HIP.

The -DHIP_PLATFORM=amd option could be specified explicitly during
configuration, so this default value is not strictly necessary.
However, HIP 5.2 defaulted to the amd platform and it would be annoying
to cause any libraries to FTBFS just due to the update to HIP 5.7.

We should reevaluate whether we want to keep this patch when updating to
ROCm 6. That said, it seems like a useful default to me.
Cordell Bloor <cgmb@slerp.xyz> no 2024-03-19
0035-optional-device-libs-find-package.patch optional device libs for hip find package
When users do find_package(hip REQUIRED), the REQUIRED argument gets
forwarded to find_dependency. However, the device libraries are not
required for many libraries that are using HIP (e.g., C or C++
applications that only use the HIP host interfaces).
Cordell Bloor <cgmb@slerp.xyz> no 2024-03-22
0036-fix-clangrt-check-for-c.patch fix clangrt check for c compilers
This patch ensures that users consistently get the message, "clangrt
compiler options not supported" when building code using the HIP host
interface with gcc or g++.

Otherwise, hip-config would warn when building for C++:

/usr/bin/C++: CLANGRT compiler options not supported.

and warn when building for C:

clangrt builtins lib not found:

despite these situations being identical.
Cordell Bloor <cgmb@slerp.xyz> no 2024-03-22
0037-deduplicate-cmake-messages.patch deduplicate hip cmake config messages
It's questionable whether this even needs to be printed once,
let alone multiple times.
Cordell Bloor <cgmb@slerp.xyz> no 2024-03-22

All known versions for source package 'rocm-hipamd'

Links