Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
X-Debbugs-Cc: debian...@lists.debian.org
Usertags: unblock
Control: affects -1 + src:rocm-hipamd
Please unblock package rocm-hipamd
rocm-hipamd 5.2.3-1 has been in testing for a few months now, so have
the following -2 and -3 revisions.
The three revisions since January were blocked from migrating by its
dependency src:llvm-toolchain-15, where a package split was introduced
to unstable, and one of the new packages was not allowed to migrate
because of an RC bug. This bug was recently fixed.
[ Reason ]
The changes in -2 to -6 are all just added patches, or packaging fixes.
[ Impact ]
The new versions are in far better shape: they've catched missing
dependencies, added patches, improved the build process, etc.
[ Tests ]
Manual tests, on the workstations of multpile maintainers. These
packages cannot be tested on debci because the tests require GPUs to work.
[ Risks ]
Given that there are no upstream changes other than added patches for
fixing this, the risks are minimal.
[ 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 testing
unblock rocm-hipamd/5.2.3-6
diff -Nru rocm-hipamd-5.2.3/debian/changelog rocm-hipamd-5.2.3/debian/changelog
--- rocm-hipamd-5.2.3/debian/changelog 2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/changelog 2023-03-10 23:38:51.000000000 +0100
@@ -1,3 +1,78 @@
+rocm-hipamd (5.2.3-6) unstable; urgency=medium
+
+ * Reduce arch to amd64, arm64, ppc64el
+ * libamdhip64-5: Add dependency on libamd-comgr2 (Closes: #1032677)
+ * Add myself to Uploaders
+ * Fix Maintainer (same list, different name)
+
+ -- Christian Kastner <c...@debian.org> Fri, 10 Mar 2023 23:38:51 +0100
+
+rocm-hipamd (5.2.3-5) unstable; urgency=medium
+
+ * d/{libamdhip64-dev,rules}: fix version file
+ Closes: #1031264
+ * add d/p/0020-replace-x86_64-with-variables.patch
+ to fix build on aarch64
+ * d/control: add file to hipcc dependencies
+ * d/control: add dependencies for find_package(hip)
+ Closes: #1031538
+ * add d/p/0021-fix-default-cmake-build-on-unsupported-gpus.patch
+ to enable gpu arch autodetection with find_package(hip)
+ * d/not-installed: ignore doxygen docs
+ * d/p/000{4,8,9}*.patch: change hip-lang cmake files,
+ to partially fix #1031540
+ * d/copyright: update copyright date
+ * d/control: add self to uploaders
+ * cleanup patch metadata
+
+ -- Cordell Bloor <c...@slerp.xyz> Sun, 19 Feb 2023 03:51:26 -0700
+
+rocm-hipamd (5.2.3-4) unstable; urgency=medium
+
+ * d/t/hipcc: also skip when no kfd driver is loaded.
+
+ -- Étienne Mollier <emoll...@debian.org> Sat, 21 Jan 2023 12:54:49 +0100
+
+rocm-hipamd (5.2.3-3) unstable; urgency=medium
+
+ * d/control: build depends on libclang-rt-15-dev.
+ * d/control: hipcc depends on libclang-rt-15-dev.
+ * d/t/hipcc: add; basic script testing hipcc.
+ * d/t/hipconfig: add; script skipping hipconfig if no amdgpu is available.
+ * d/t/control: add hipcc to superficial autopkgtests.
+ * d/t/control: run the d/t/hipconfig test script instead of the command;
+ this allows us to trigger conditions for when hardware is not available
+ and the script has to be skipped.
+
+ -- Étienne Mollier <emoll...@debian.org> Wed, 18 Jan 2023 20:35:17 +0100
+
+rocm-hipamd (5.2.3-2) unstable; urgency=medium
+
+ [ Cordell Bloor ]
+ * d/patches: add 0020-hipcc-remove-rpath-flags.patch
+ Closes: #1021642
+ * d/rules: trim unnecessary rules
+ * d/rules: strip RUNPATH from libamdhip64.so
+ * debian/patches: backport 56b3260 from upstream
+ Closes: #1021643
+ * d/rules: disable creation of duplicate files
+ * d/patches: fix search paths when building with g++
+ * d/patches: add 0002-fix-cmake-library-notfound-check.patch
+ * d/libamdhip64-dev.install: install /usr/share/hip/version
+
+ [ Étienne Mollier ]
+ * 0005-clang-15.patch: also adjust llc postfix.
+ Thanks to Jakub Jaszewski
+ * d/t/control: check hipconfig doesn't output error messages.
+ * d/control: hipcc depends on rocminfo.
+ * d/control: declare compliance to standards version 4.6.2.
+ * d/copyright: update copyright year.
+ * d/rules: build tests in parallel.
+ * d/rules: set library path to find the freshly built library.
+ * d/rules: force run tests sequentially; avoid bus contention on the GPU.
+
+ -- Étienne Mollier <emoll...@debian.org> Sat, 14 Jan 2023 11:16:01 +0100
+
rocm-hipamd (5.2.3-1) unstable; urgency=medium
* Migrate ROCm 5.2.3 to unstable.
diff -Nru rocm-hipamd-5.2.3/debian/control rocm-hipamd-5.2.3/debian/control
--- rocm-hipamd-5.2.3/debian/control 2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/control 2023-03-10 23:38:51.000000000 +0100
@@ -6,12 +6,14 @@
Section: devel
Homepage: https://github.com/rocm-developer-tools/hipamd
Priority: optional
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
Vcs-Git: https://salsa.debian.org/rocm-team/rocm-hipamd.git
Vcs-Browser: https://salsa.debian.org/rocm-team/rocm-hipamd
-Maintainer: Debian Deep Learning Team <debian...@lists.debian.org>
+Maintainer: Debian ROCm Team <debian...@lists.debian.org>
Uploaders: Maxime Chambonnet <max...@maxzor.eu>,
- Étienne Mollier <emoll...@debian.org>
+ Étienne Mollier <emoll...@debian.org>,
+ Cordell Bloor <c...@slerp.xyz>,
+ Christian Kastner <c...@debian.org>,
Build-Depends: debhelper-compat (= 13),
clang-15,
clang-format-15,
@@ -21,6 +23,7 @@
cmake,
libamd-comgr-dev (>= 5.2.0~),
libclang-15-dev,
+ libclang-rt-15-dev,
libhsa-runtime-dev (>= 5.2.0~),
libnuma-dev,
librocm-smi-dev (>= 5.2.0~) <!nocheck>,
@@ -37,13 +40,17 @@
# Targets of the amdhip upstream repository
Package: hipcc
-Architecture: any
+Architecture: amd64 arm64 ppc64el
Depends: ${misc:Depends},
clang-15,
+ llvm-15,
lld-15,
clang-tools-15,
rocm-device-libs,
+ rocminfo,
libamdhip64-dev,
+ libclang-rt-15-dev,
+ file,
# roc-obj* dependencies:
libfile-which-perl,
liburi-encode-perl
@@ -73,8 +80,8 @@
Package: libamdhip64-5
Section: libs
-Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
+Architecture: amd64 arm64 ppc64el
+Depends: libamd-comgr2, ${misc:Depends}, ${shlibs:Depends}
Description: Heterogeneous Interface for Portability - AMD GPUs implementation
This package is central to the ROCm stack, it is at the exchange point between
the low-level libraries - kernel module ROCk, thunk ROCt, runtime ROCr, etc,
@@ -82,10 +89,12 @@
Package: libamdhip64-dev
Section: libdevel
-Architecture: any
+Architecture: amd64 arm64 ppc64el
Depends: ${misc:Depends},
libamdhip64-5 (= ${binary:Version}),
- libhiprtc-builtins5 (= ${binary:Version})
+ libhiprtc-builtins5 (= ${binary:Version}),
+ libamd-comgr-dev,
+ libhsa-runtime-dev
Description: Header files for the AMD implementation of HIP
The libamdhip64 is central to the ROCm stack, it is at the exchange point
between the low-level libraries - kernel module ROCk, thunk ROCt, runtime
@@ -96,7 +105,7 @@
Package: libhiprtc-builtins5
Section: libs
-Architecture: any
+Architecture: amd64 arm64 ppc64el
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: HIP Run Time Compilation libraries
HIP allows one to compile kernels at runtime with its hiprtc* APIs. hipRTC
diff -Nru rocm-hipamd-5.2.3/debian/copyright rocm-hipamd-5.2.3/debian/copyright
--- rocm-hipamd-5.2.3/debian/copyright 2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/copyright 2023-03-10 23:38:51.000000000 +0100
@@ -134,7 +134,8 @@
Files: debian/*
Copyright: 2022, Maxime Chambonnet <max...@maxzor.eu>
- 2022, Étienne Mollier <emoll...@debian.org>
+ 2022-2023, Étienne Mollier <emoll...@debian.org>
+ 2022-2023, Cordell Bloor <c...@slerp.xyz>
License: Expat
License: Apache-2
diff -Nru rocm-hipamd-5.2.3/debian/hipcc.install
rocm-hipamd-5.2.3/debian/hipcc.install
--- rocm-hipamd-5.2.3/debian/hipcc.install 2022-10-20 21:20:33.000000000
+0200
+++ rocm-hipamd-5.2.3/debian/hipcc.install 2023-03-10 23:38:51.000000000
+0100
@@ -1 +1,11 @@
-usr/bin
+usr/bin/hip_embed_pch.sh
+usr/bin/hipcc
+usr/bin/hipcc.pl
+usr/bin/hipcc_cmake_linker_helper
+usr/bin/hipconfig
+usr/bin/hipconfig.pl
+usr/bin/hipdemangleatp
+usr/bin/hipvars.pm
+usr/bin/roc-obj
+usr/bin/roc-obj-extract
+usr/bin/roc-obj-ls
diff -Nru rocm-hipamd-5.2.3/debian/libamdhip64-dev.install
rocm-hipamd-5.2.3/debian/libamdhip64-dev.install
--- rocm-hipamd-5.2.3/debian/libamdhip64-dev.install 2022-10-20
21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/libamdhip64-dev.install 2023-03-10
23:38:51.000000000 +0100
@@ -2,4 +2,4 @@
usr/lib/${DEB_HOST_MULTIARCH}/libhiprtc-builtins.so
usr/include/hip
usr/lib/${DEB_HOST_MULTIARCH}/cmake
-usr/lib/cmake
+usr/share/hip/version
diff -Nru rocm-hipamd-5.2.3/debian/not-installed
rocm-hipamd-5.2.3/debian/not-installed
--- rocm-hipamd-5.2.3/debian/not-installed 2022-10-20 21:20:33.000000000
+0200
+++ rocm-hipamd-5.2.3/debian/not-installed 2023-03-10 23:38:51.000000000
+0100
@@ -1,13 +1,15 @@
usr/cmake/FindHIP*
usr/lib/.hipInfo
-usr/bin/.hipVersion
# Duplicate files in non FHS compliant directory
usr/hip/*
# Duplicate files in multiarch unfriendly directory
usr/lib/libamdhip64.so*
usr/lib/libhiprtc-builtins.so*
usr/lib/libhiprtc.so*
+usr/lib/cmake
# Extra license file
usr/share/doc/hip/LICENSE.txt
# TODO: Samples would be interesting to get in a side package.
usr/share/hip/samples/*
+# doxygen docs
+usr/share/doc/hip/RuntimeAPI/html
diff -Nru rocm-hipamd-5.2.3/debian/patches/0001-Clang-version-munging.patch
rocm-hipamd-5.2.3/debian/patches/0001-Clang-version-munging.patch
--- rocm-hipamd-5.2.3/debian/patches/0001-Clang-version-munging.patch
2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0001-Clang-version-munging.patch
2023-03-10 23:38:51.000000000 +0100
@@ -1,9 +1,9 @@
From: Maxime Chambonnet <max...@maxzor.eu>
Date: Sat, 11 Feb 2022 11:28:54 +0100
Subject: Clang version munging
- https://github.com/ROCm-Developer-Tools/HIP/pull/2451
-Forwarded: yes
+Forwarded: https://github.com/ROCm-Developer-Tools/HIP/pull/2451
+Applied-Upstream:
https://github.com/ROCm-Developer-Tools/HIP/commit/0c443d12011da16a036057e0472ae59c68bc901f
---
hip/bin/hipcc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -Nru
rocm-hipamd-5.2.3/debian/patches/0002-fix-cmake-library-notfound-check.patch
rocm-hipamd-5.2.3/debian/patches/0002-fix-cmake-library-notfound-check.patch
---
rocm-hipamd-5.2.3/debian/patches/0002-fix-cmake-library-notfound-check.patch
1970-01-01 01:00:00.000000000 +0100
+++
rocm-hipamd-5.2.3/debian/patches/0002-fix-cmake-library-notfound-check.patch
2023-03-10 23:38:51.000000000 +0100
@@ -0,0 +1,47 @@
+From: Cordell Bloor <c...@slerp.xyz>
+Date: Mon, 24 Oct 2022 00:07:40 -0400
+Subject: fix cmake library notfound check
+
+If find_library does not find the library, the given variable is
+set with a value that has a -NOTFOUND suffix. For example, the
+CLANGRT_BUILTINS variable will be set with the value
+CLANGRT_BUILTINS-NOTFOUND.
+
+Applied-Upstream:
https://github.com/ROCm-Developer-Tools/HIP/commit/d12d0ebc578601de138765ee4b1ddd2dcbc79edf
+
+---
+diff --git a/hip-config.cmake.in b/hip-config.cmake.in
+index ba3e75c..a27badc 100755
+--- a/hip-config.cmake.in
++++ b/hip-config.cmake.in
+@@ -287,7 +287,7 @@ if(HIP_COMPILER STREQUAL "clang")
+ ${HIP_CLANG_INCLUDE_PATH}/../lib/linux)
+
+ # Add support for __fp16 and _Float16, explicitly link with compiler-rt
+- if(CLANGRT_BUILTINS-NOTFOUND)
++ if(NOT CLANGRT_BUILTINS)
+ message(FATAL_ERROR "clangrt builtins lib not found")
+ else()
+ set_property(TARGET hip::host APPEND PROPERTY INTERFACE_LINK_LIBRARIES
"${CLANGRT_BUILTINS}")
+diff --git a/hip/hip-lang-config.cmake.in b/hip/hip-lang-config.cmake.in
+index 1a72643..07f24f9 100644
+--- a/hip/hip-lang-config.cmake.in
++++ b/hip/hip-lang-config.cmake.in
+@@ -94,7 +94,7 @@ find_path(HSA_HEADER hsa/hsa.h
+ /opt/rocm/include
+ )
+
+-if (HSA_HEADER-NOTFOUND)
++if (NOT HSA_HEADER)
+ message (FATAL_ERROR "HSA header not found! ROCM_PATH environment not set")
+ endif()
+
+@@ -136,7 +136,7 @@ set_property(TARGET hip-lang::device APPEND PROPERTY
+ )
+
+ # Add support for __fp16 and _Float16, explicitly link with compiler-rt
+-if(CLANGRT_BUILTINS-NOTFOUND)
++if(NOT CLANGRT_BUILTINS)
+ message(FATAL_ERROR "clangrt builtins lib not found")
+ else()
+ set_property(TARGET hip-lang::device APPEND PROPERTY
diff -Nru rocm-hipamd-5.2.3/debian/patches/0003-hip-config.cmake.patch
rocm-hipamd-5.2.3/debian/patches/0003-hip-config.cmake.patch
--- rocm-hipamd-5.2.3/debian/patches/0003-hip-config.cmake.patch
2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0003-hip-config.cmake.patch
2023-03-10 23:38:51.000000000 +0100
@@ -2,6 +2,7 @@
Date: Thu, 27 Jan 2022 18:47:04 +0100
Subject: hip-config.cmake
+Forwarded: no
---
hip-config.cmake.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -Nru rocm-hipamd-5.2.3/debian/patches/0004-hip-cmake-install.patch
rocm-hipamd-5.2.3/debian/patches/0004-hip-cmake-install.patch
--- rocm-hipamd-5.2.3/debian/patches/0004-hip-cmake-install.patch
2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0004-hip-cmake-install.patch
2023-03-10 23:38:51.000000000 +0100
@@ -2,6 +2,7 @@
Date: Tue, 8 Feb 2022 12:41:33 +0100
Subject: hip cmake install
+Applied-Upstream:
https://github.com/ROCm-Developer-Tools/hipamd/commit/f892306e227983a7c1943992ba70bf4e4b189105
---
src/CMakeLists.txt | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
@@ -36,7 +37,7 @@
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-INSTALL(EXPORT hip-lang-targets DESTINATION
${CONFIG_LANG_PACKAGE_INSTALL_DIR} NAMESPACE hip-lang::)
-+INSTALL(EXPORT hip-lang-targets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/hip
NAMESPACE hip-lang::)
++INSTALL(EXPORT hip-lang-targets DESTINATION
${CMAKE_INSTALL_LIBDIR}/cmake/hip-lang NAMESPACE hip-lang::)
if(NOT WIN32)
include(CMakePackageConfigHelpers)
@@ -45,6 +46,6 @@
${CMAKE_CURRENT_BINARY_DIR}/hip-lang-config-version.cmake
DESTINATION
- ${CONFIG_LANG_PACKAGE_INSTALL_DIR}/
-+ ${CMAKE_INSTALL_LIBDIR}/cmake/hip
++ ${CMAKE_INSTALL_LIBDIR}/cmake/hip-lang
)
endif()
diff -Nru rocm-hipamd-5.2.3/debian/patches/0005-clang-15.patch
rocm-hipamd-5.2.3/debian/patches/0005-clang-15.patch
--- rocm-hipamd-5.2.3/debian/patches/0005-clang-15.patch 2022-10-20
21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0005-clang-15.patch 2023-03-10
23:38:51.000000000 +0100
@@ -45,15 +45,17 @@
}
$HIP_CLANG_VERSION=~/.*clang version (\S+).*/;
$HIP_CLANG_VERSION=$1;
-@@ -176,7 +176,7 @@
+@@ -176,8 +176,8 @@
$win_output = `perl \"$HIP_PATH/bin/hipcc\" --ldflags`;
printf("$win_output \n");
} else {
- system("$HIP_CLANG_PATH/clang++ --version");
+- system("$HIP_CLANG_PATH/llc --version");
+ system("$HIP_CLANG_PATH/clang++-15 --version");
- system("$HIP_CLANG_PATH/llc --version");
++ system("$HIP_CLANG_PATH/llc-15 --version");
print ("hip-clang-cxxflags : ");
system("$HIP_PATH/bin/hipcc --cxxflags");
+ printf("\n");
--- rocm-hipamd.orig/hip/bin/hipcc.pl
+++ rocm-hipamd/hip/bin/hipcc.pl
@@ -145,11 +145,11 @@
diff -Nru rocm-hipamd-5.2.3/debian/patches/0006-cram-build-id.patch
rocm-hipamd-5.2.3/debian/patches/0006-cram-build-id.patch
--- rocm-hipamd-5.2.3/debian/patches/0006-cram-build-id.patch 2022-10-20
21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0006-cram-build-id.patch 1970-01-01
01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-Description: cram HIP_VERSION_BUILD_ID
- The HIP_VERSION_BUILD_ID definition is not caught when building outside git
- tree context. However, when building with all warnings turned on as errors,
- this causes a failure to build from source due to a non-void function
- returning nothing, as the HIP_VERSION_BUILD_ID resolves to nothing in:
- .
- return HIP_VERSION_BUILD_ID;
-Author: Étienne Mollier <emoll...@debian.org>
-Forwarded: no
-Last-Update: 2022-05-09
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- rocm-hipamd.orig/CMakeLists.txt
-+++ rocm-hipamd/CMakeLists.txt
-@@ -140,6 +140,7 @@
- endif()
- else()
- # FIXME: Some parts depend on this being set.
-+ set(HIP_VERSION_BUILD_ID 0)
- set(HIP_PACKAGING_VERSION_PATCH "0")
- endif()
-
diff -Nru rocm-hipamd-5.2.3/debian/patches/0008-dotdots.patch
rocm-hipamd-5.2.3/debian/patches/0008-dotdots.patch
--- rocm-hipamd-5.2.3/debian/patches/0008-dotdots.patch 2022-10-20
21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0008-dotdots.patch 2023-03-10
23:38:51.000000000 +0100
@@ -18,3 +18,16 @@
# Windows doesn't need HSA
if(NOT WIN32)
+diff --git a/hip/hip-lang-config.cmake.in b/hip/hip-lang-config.cmake.in
+index dbc8e53..45fc9f5 100644
+--- a/hip/hip-lang-config.cmake.in
++++ b/hip/hip-lang-config.cmake.in
+@@ -68,7 +68,7 @@ include( "${CMAKE_CURRENT_LIST_DIR}/hip-lang-targets.cmake" )
+ #get_filename_component cannot resolve the symlinks if called from
/opt/rocm/lib/hip
+ #and do three level up again
+ get_filename_component(_DIR "${CMAKE_CURRENT_LIST_DIR}" REALPATH)
+-get_filename_component(_IMPORT_PREFIX "${_DIR}/../../../" REALPATH)
++get_filename_component(_IMPORT_PREFIX "${_DIR}/../../../../" REALPATH)
+
+
+ #need _IMPORT_PREFIX to be set #FILE_REORG_BACKWARD_COMPATIBILITY
diff -Nru rocm-hipamd-5.2.3/debian/patches/0009-devicelib-searchpath.patch
rocm-hipamd-5.2.3/debian/patches/0009-devicelib-searchpath.patch
--- rocm-hipamd-5.2.3/debian/patches/0009-devicelib-searchpath.patch
2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0009-devicelib-searchpath.patch
2023-03-10 23:38:51.000000000 +0100
@@ -29,3 +29,20 @@
endif()
hip_add_interface_link_flags(hip::device --hip-link)
+diff --git a/hip/hip-lang-config.cmake.in b/hip/hip-lang-config.cmake.in
+index 45fc9f5..05f4162 100644
+--- a/hip/hip-lang-config.cmake.in
++++ b/hip/hip-lang-config.cmake.in
+@@ -125,12 +125,6 @@ set_property(TARGET hip-lang::device APPEND PROPERTY
+ INTERFACE_COMPILE_OPTIONS
"$<$<COMPILE_LANGUAGE:HIP>:SHELL:-mllvm;-amdgpu-early-inline-all=true;-mllvm;-amdgpu-function-calls=false>"
+ )
+
+-if (NOT EXISTS "${AMD_DEVICE_LIBS_PREFIX}/amdgcn/bitcode")
+- set_property(TARGET hip-lang::device APPEND PROPERTY
+- INTERFACE_COMPILE_OPTIONS
"$<$<COMPILE_LANGUAGE:HIP>:--hip-device-lib-path=${AMD_DEVICE_LIBS_PREFIX}/lib>"
+- )
+-endif()
+-
+ set_property(TARGET hip-lang::device APPEND PROPERTY
+ INTERFACE_LINK_OPTIONS "$<$<LINK_LANGUAGE:HIP>:--hip-link>"
+ )
diff -Nru rocm-hipamd-5.2.3/debian/patches/0015-default-hip-clang-path.patch
rocm-hipamd-5.2.3/debian/patches/0015-default-hip-clang-path.patch
--- rocm-hipamd-5.2.3/debian/patches/0015-default-hip-clang-path.patch
2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0015-default-hip-clang-path.patch
2023-03-10 23:38:51.000000000 +0100
@@ -2,9 +2,11 @@
Date: Sun, 18 Sep 2022 20:51:13 +0000
Subject: HIP_CLANG_PATH: add check for clang in /usr/bin
+Forwarded: not-needed
---
hip/bin/hipvars.pm | 4 ++++
- 1 file changed, 4 insertions(+)
+ hip-config.cmake | 2 +-
+ 2 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hip/bin/hipvars.pm b/hip/bin/hipvars.pm
index 340a666..a3b2bc0 100644
@@ -22,3 +24,16 @@
}
# HIP_ROCCLR_HOME is used by Windows builds
$HIP_ROCCLR_HOME=$ENV{'HIP_ROCCLR_HOME'};
+diff --git a/hip-config.cmake.in b/hip-config.cmake.in
+index bc7ba9a..827ea7a 100755
+--- a/hip-config.cmake.in
++++ b/hip-config.cmake.in
+@@ -127,7 +127,7 @@ if(HIP_COMPILER STREQUAL "clang")
+ if(WIN32)
+ file(TO_CMAKE_PATH "$ENV{HIP_PATH}" HIP_CLANG_ROOT)
+ else()
+- set(HIP_CLANG_ROOT "${ROCM_PATH}/llvm")
++ set(HIP_CLANG_ROOT /usr)
+ endif()
+ if(NOT HIP_CXX_COMPILER)
+ set(HIP_CXX_COMPILER ${CMAKE_CXX_COMPILER})
diff -Nru rocm-hipamd-5.2.3/debian/patches/0016-default-device-lib-path.patch
rocm-hipamd-5.2.3/debian/patches/0016-default-device-lib-path.patch
--- rocm-hipamd-5.2.3/debian/patches/0016-default-device-lib-path.patch
2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0016-default-device-lib-path.patch
2023-03-10 23:38:51.000000000 +0100
@@ -2,6 +2,7 @@
Date: Sun, 18 Sep 2022 20:53:46 +0000
Subject: DEVICE_LIB_PATH: add check for multiarch dirs
+Forwarded: no
---
hip/bin/hipcc.pl | 5 +++++
1 file changed, 5 insertions(+)
diff -Nru rocm-hipamd-5.2.3/debian/patches/0017-default-rocm-path.patch
rocm-hipamd-5.2.3/debian/patches/0017-default-rocm-path.patch
--- rocm-hipamd-5.2.3/debian/patches/0017-default-rocm-path.patch
2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0017-default-rocm-path.patch
2023-03-10 23:38:51.000000000 +0100
@@ -2,9 +2,11 @@
Date: Sun, 18 Sep 2022 23:02:08 +0000
Subject: ROCM_PATH: use /usr as default
+Forwarded: not-needed
---
hip/bin/hipvars.pm | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
+ hip-config.cmake | 2 +-
+ 2 file changed, 4 insertions(+), 2 deletion(-)
diff --git a/hip/bin/hipvars.pm b/hip/bin/hipvars.pm
index a3b2bc0..a48189e 100644
@@ -21,3 +23,16 @@
$ROCM_PATH=$ENV{'ROCM_PATH'} // dirname("$HIP_PATH"); # use parent
directory of HIP_PATH ,FILE_REORG
}elsif (-e "$HIP_PATH/bin/rocm_agent_enumerator") {
$ROCM_PATH=$ENV{'ROCM_PATH'} // "$HIP_PATH"; # use HIP_PATH
+diff --git a/hip-config.cmake.in b/hip-config.cmake.in
+index bc7ba9a..827ea7a 100755
+--- a/hip-config.cmake.in
++++ b/hip-config.cmake.in
+@@ -114,7 +114,7 @@ if(WIN32)
+ else()
+ # Linux - set a default path for ROCM_PATH
+ if(NOT DEFINED ROCM_PATH)
+- set(ROCM_PATH /opt/rocm)
++ set(ROCM_PATH /usr)
+ endif()
+
+ #If HIP is not installed under ROCm, need this to find HSA assuming HSA is
under ROCm
diff -Nru rocm-hipamd-5.2.3/debian/patches/0018-rocm-path-flag.patch
rocm-hipamd-5.2.3/debian/patches/0018-rocm-path-flag.patch
--- rocm-hipamd-5.2.3/debian/patches/0018-rocm-path-flag.patch 2022-10-20
21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/patches/0018-rocm-path-flag.patch 2023-03-10
23:38:51.000000000 +0100
@@ -2,6 +2,7 @@
Date: Mon, 19 Sep 2022 00:34:12 +0000
Subject: pass rocm_path as flag
+Forwarded: not-needed
---
hip/bin/hipcc.pl | 7 +++++++
1 file changed, 7 insertions(+)
diff -Nru rocm-hipamd-5.2.3/debian/patches/0019-fix-git-version-info.patch
rocm-hipamd-5.2.3/debian/patches/0019-fix-git-version-info.patch
--- rocm-hipamd-5.2.3/debian/patches/0019-fix-git-version-info.patch
1970-01-01 01:00:00.000000000 +0100
+++ rocm-hipamd-5.2.3/debian/patches/0019-fix-git-version-info.patch
2023-03-10 23:38:51.000000000 +0100
@@ -0,0 +1,69 @@
+From 56b32604729cca08bdcf00c7a69da8a75cc95b8a Mon Sep 17 00:00:00 2001
+From: Cordell Bloor <cordell.bl...@amd.com>
+Date: Fri, 6 May 2022 14:19:47 -0600
+Subject: [PATCH] SWDEV-335902 - Fix HIP when Git info unavailable
+
+Prior to this change, when Git_FOUND was false, HIP_VERSION_BUILD_ID
+would be undefined in the CMake code. The value of HIP_VERSION_BUILD_ID
+in <hip/hip_version.h> is taken from the CMake variable, so it was being
+defined as nothing in those cases. That would cause compilation failures,
+as src/hip_global.cpp contains the function:
+
+ size_t amd_dbgapi_get_build_id() {
+ return HIP_VERSION_BUILD_ID;
+ }
+
+which would become
+
+ size_t amd_dbgapi_get_build_id() {
+ return ;
+ }
+
+after preprocessing. To prevent this, we can define the version
+information to a default value when Git is not found.
+
+A related problem was reported by Harmen Stoppels in
+https://github.com/ROCm-Developer-Tools/HIP/pull/2218. When Git
+is not available (or if the library is being built from a tarball),
+the HIP_VERSION_GITHASH is not defined. This causes trouble because
+HIP_LIB_VERSION_STRING is defined as "X.Y.Z-${HIP_VERSION_GITHASH}"
+and therefore becomes "X.Y.Z-".
+
+The incomplete version string becomes a problem when it is appended
+to the shared library file name. File names that end with '-' confuse
+the linker. They cause strange errors when attempting to link to the
+HIP library. This problem can be prevented by dropping the trailing
+dash and using "X.Y.Z" as the version string when HIP_VERSION_GITHASH
+is not defined.
+
+Change-Id: I6e290c1f1b603ba30c9ded885e125d9ca9a2e688
+Signed-off-by: Cordell Bloor <cordell.bl...@amd.com>
+---
+ CMakeLists.txt | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8f1d92c..0a969d9 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -139,6 +139,8 @@ if(GIT_FOUND)
+ set(HIP_PACKAGING_VERSION_PATCH
${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
+ endif()
+ else()
++ set(HIP_VERSION_BUILD_ID 0)
++ set(HIP_VERSION_BUILD_NAME "")
+ # FIXME: Some parts depend on this being set.
+ set(HIP_PACKAGING_VERSION_PATCH "0")
+ endif()
+@@ -182,8 +184,10 @@ set (HIP_LIB_VERSION_MAJOR ${HIP_VERSION_MAJOR})
+ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR})
+ if (${ROCM_PATCH_VERSION} )
+ set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION})
+-else ()
++elseif (DEFINED HIP_VERSION_GITHASH)
+ set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
++else ()
++ set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH})
+ endif ()
+ set (HIP_LIB_VERSION_STRING
"${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}")
+ if (DEFINED ENV{ROCM_RPATH})
diff -Nru rocm-hipamd-5.2.3/debian/patches/0020-hipcc-remove-rpath-flags.patch
rocm-hipamd-5.2.3/debian/patches/0020-hipcc-remove-rpath-flags.patch
--- rocm-hipamd-5.2.3/debian/patches/0020-hipcc-remove-rpath-flags.patch
1970-01-01 01:00:00.000000000 +0100
+++ rocm-hipamd-5.2.3/debian/patches/0020-hipcc-remove-rpath-flags.patch
2023-03-10 23:38:51.000000000 +0100
@@ -0,0 +1,22 @@
+From: Cordell Bloor <c...@slerp.xyz>
+Date: Fri, 21 Oct 2022 23:35:01 -0400
+Subject: hipcc remove rpath flags
+
+Forwarded: not-needed
+---
+ hip/bin/hipcc.pl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hip/bin/hipcc.pl b/hip/bin/hipcc.pl
+index b806c2b..de3c022 100755
+--- a/hip/bin/hipcc.pl
++++ b/hip/bin/hipcc.pl
+@@ -729,7 +729,7 @@ if ($HIP_PLATFORM eq "amd") {
+ if ($linkType eq 0) {
+ $toolArgs = " -L$HIP_LIB_PATH -lamdhip64 -L$ROCM_PATH/lib
-lhsa-runtime64 -ldl -lnuma " . ${toolArgs};
+ } else {
+- $toolArgs = ${toolArgs} . " -Wl,--enable-new-dtags
-Wl,-rpath=$HIP_LIB_PATH:$ROCM_PATH/lib -lamdhip64 ";
++ $toolArgs = ${toolArgs} . " -lamdhip64 ";
+ }
+ # To support __fp16 and _Float16, explicitly link with compiler-rt
+
$HIP_CLANG_BUILTIN_LIB="$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET/libclang_rt.builtins.a";
diff -Nru
rocm-hipamd-5.2.3/debian/patches/0020-replace-x86_64-with-variables.patch
rocm-hipamd-5.2.3/debian/patches/0020-replace-x86_64-with-variables.patch
--- rocm-hipamd-5.2.3/debian/patches/0020-replace-x86_64-with-variables.patch
1970-01-01 01:00:00.000000000 +0100
+++ rocm-hipamd-5.2.3/debian/patches/0020-replace-x86_64-with-variables.patch
2023-03-10 23:38:51.000000000 +0100
@@ -0,0 +1,68 @@
+From: Cordell Bloor <c...@slerp.xyz>
+Date: Tue, 14 Feb 2023 03:25:28 -0700
+Subject: 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.
+
+Bug: https://github.com/ROCm-Developer-Tools/HIP/issues/2215
+---
+ hip-config.cmake.in | 2 +-
+ hip/bin/hip_embed_pch.sh | 2 +-
+ hip/bin/hipcc.pl | 3 ++-
+ hip/hip-lang-config.cmake.in | 2 +-
+ 4 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/hip-config.cmake.in b/hip-config.cmake.in
+index b7c3e3c..73a2a92 100755
+--- a/hip-config.cmake.in
++++ b/hip-config.cmake.in
+@@ -271,7 +271,7 @@ if(HIP_COMPILER STREQUAL "clang")
+ find_library(CLANGRT_BUILTINS
+ NAMES
+ clang_rt.builtins
+- clang_rt.builtins-x86_64
++ clang_rt.builtins-${CMAKE_SYSTEM_PROCESSOR}
+ PATHS
+ ${HIP_CLANGRT_LIB_SEARCH_PATHS}
+ ${HIP_CLANG_INCLUDE_PATH}/../lib/linux)
+diff --git a/hip/bin/hip_embed_pch.sh b/hip/bin/hip_embed_pch.sh
+index 8bc15a8..92be02e 100755
+--- a/hip/bin/hip_embed_pch.sh
++++ b/hip/bin/hip_embed_pch.sh
+@@ -129,7 +129,7 @@ EOF
+
+ cat $tmp/hip_macros.h >> $tmp/pch.cui &&
+
+- $LLVM_DIR/bin/clang -cc1 -O3 -emit-pch -triple amdgcn-amd-amdhsa
-aux-triple x86_64-unknown-linux-gnu -fcuda-is-device -std=c++17
-fgnuc-version=4.2.1 -o $tmp/hip.pch -x hip-cpp-output - <$tmp/pch.cui &&
++ $LLVM_DIR/bin/clang -cc1 -O3 -emit-pch -triple amdgcn-amd-amdhsa
-aux-triple $(uname -m)-unknown-linux-gnu -fcuda-is-device -std=c++17
-fgnuc-version=4.2.1 -o $tmp/hip.pch -x hip-cpp-output - <$tmp/pch.cui &&
+
+ $LLVM_DIR/bin/llvm-mc -o hip_pch.o $tmp/hip_pch.mcin --filetype=obj &&
+
+diff --git a/hip/bin/hipcc.pl b/hip/bin/hipcc.pl
+index de3c022..853f3fd 100755
+--- a/hip/bin/hipcc.pl
++++ b/hip/bin/hipcc.pl
+@@ -736,7 +736,8 @@ if ($HIP_PLATFORM eq "amd") {
+ if (-e $HIP_CLANG_BUILTIN_LIB) {
+ $toolArgs .= "
-L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/$HIP_CLANG_TARGET
-lclang_rt.builtins "
+ } else {
+- $toolArgs .= "
-L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/linux
-lclang_rt.builtins-x86_64 "
++ my $arch = `uname -m`;
++ $toolArgs .= "
-L$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION/lib/linux
-lclang_rt.builtins-$arch "
+ }
+ }
+ }
+diff --git a/hip/hip-lang-config.cmake.in b/hip/hip-lang-config.cmake.in
+index dbc8e53..fa73e06 100644
+--- a/hip/hip-lang-config.cmake.in
++++ b/hip/hip-lang-config.cmake.in
+@@ -103,7 +103,7 @@ file(GLOB HIP_CLANGRT_LIB_SEARCH_PATHS
"${HIP_COMPILER_INSTALL_PATH}/../lib/clan
+ find_library(CLANGRT_BUILTINS
+ NAMES
+ clang_rt.builtins
+- clang_rt.builtins-x86_64
++ clang_rt.builtins-${CMAKE_SYSTEM_PROCESSOR}
+ PATHS
+ ${HIP_CLANGRT_LIB_SEARCH_PATHS}
+ ${HIP_CLANG_INCLUDE_PATH}/../lib/linux)
diff -Nru
rocm-hipamd-5.2.3/debian/patches/0021-fix-default-cmake-build-on-unsupported-gpus.patch
rocm-hipamd-5.2.3/debian/patches/0021-fix-default-cmake-build-on-unsupported-gpus.patch
---
rocm-hipamd-5.2.3/debian/patches/0021-fix-default-cmake-build-on-unsupported-gpus.patch
1970-01-01 01:00:00.000000000 +0100
+++
rocm-hipamd-5.2.3/debian/patches/0021-fix-default-cmake-build-on-unsupported-gpus.patch
2023-03-10 23:38:51.000000000 +0100
@@ -0,0 +1,26 @@
+From: Cordell Bloor <c...@slerp.xyz>
+Date: Fri, 17 Feb 2023 16:05:11 -0700
+Subject: fix default cmake build on unsupported gpus
+
+If AMDGPU_TARGETS is not set (or is set to nothing), then hipcc and
+clang will autodetect the installed hardware. This default, however,
+prevents that autodetection by setting it to a specific set of values.
+
+Forwarded: not-needed
+---
+ hip-config.cmake.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hip-config.cmake.in b/hip-config.cmake.in
+index 73a2a92..73ef43b 100755
+--- a/hip-config.cmake.in
++++ b/hip-config.cmake.in
+@@ -164,7 +164,7 @@ if(HIP_COMPILER STREQUAL "clang")
+ if(NOT WIN32)
+ find_dependency(AMDDeviceLibs)
+ endif()
+- set(AMDGPU_TARGETS "gfx900;gfx906;gfx908;gfx90a;gfx1030" CACHE STRING "AMD
GPU targets to compile for")
++ set(AMDGPU_TARGETS "" CACHE STRING "AMD GPU targets to compile for")
+ set(GPU_TARGETS "${AMDGPU_TARGETS}" CACHE STRING "GPU targets to compile
for")
+ endif()
+
diff -Nru rocm-hipamd-5.2.3/debian/patches/series
rocm-hipamd-5.2.3/debian/patches/series
--- rocm-hipamd-5.2.3/debian/patches/series 2022-10-20 21:20:33.000000000
+0200
+++ rocm-hipamd-5.2.3/debian/patches/series 2023-03-10 23:38:51.000000000
+0100
@@ -1,8 +1,8 @@
0001-Clang-version-munging.patch
+0002-fix-cmake-library-notfound-check.patch
0003-hip-config.cmake.patch
0004-hip-cmake-install.patch
0005-clang-15.patch
-0006-cram-build-id.patch
0007-isystem-removal.patch
0008-dotdots.patch
0009-devicelib-searchpath.patch
@@ -15,3 +15,7 @@
0016-default-device-lib-path.patch
0017-default-rocm-path.patch
0018-rocm-path-flag.patch
+0019-fix-git-version-info.patch
+0020-hipcc-remove-rpath-flags.patch
+0020-replace-x86_64-with-variables.patch
+0021-fix-default-cmake-build-on-unsupported-gpus.patch
diff -Nru rocm-hipamd-5.2.3/debian/rules rocm-hipamd-5.2.3/debian/rules
--- rocm-hipamd-5.2.3/debian/rules 2022-10-20 21:20:33.000000000 +0200
+++ rocm-hipamd-5.2.3/debian/rules 2023-03-10 23:38:51.000000000 +0100
@@ -9,8 +9,6 @@
export ROCM_PATH = /usr
export DEVICE_LIB_PATH = /usr/lib/$(DEB_HOST_MULTIARCH)/amdgcn/bitcode
export HIP_CLANG_HCC_COMPAT_MODE = 1
-export HIPCC_COMPILE_FLAGS_APPEND = --hip-version=$(HIP_VERSION)
-export HIPCC_LINK_FLAGS_APPEND = --hip-version=$(HIP_VERSION)
# Verbose mode, for help with debuging build problems
#export HIPCC_COMPILE_FLAGS_APPEND += -v
#export HIPCC_LINK_FLAGS_APPEND += -v
@@ -34,11 +32,10 @@
-DAMD_OPENCL_PATH=$(shell realpath opencl) \
-DROCCLR_PATH=$(shell realpath clr) \
-DROCM_PATH=/usr \
+ -DFILE_REORG_BACKWARD_COMPATIBILITY=OFF \
-DCMAKE_HIP_ARCHITECTURES=gfx906 \
-DOFFLOAD_ARCH_STR=" $(OFFLOAD_ARCHS_STR)" \
- -DHIP_PLATFORM=amd \
- -DHIP_CLANG_PATH=/usr/bin \
- -DLLVM_PATH=/usr
+ -DHIP_PLATFORM=amd
# ROCm from 5.0 has dwarf 5 section headers:
# https://github.com/ROCm-Developer-Tools/hipamd/issues/17
@@ -48,10 +45,11 @@
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
- dh_auto_build --no-parallel -- build_tests
+ dh_auto_build -- build_tests
set -e \
; if [ -r /dev/kfd ] \
- ; then dh_auto_test -- \
+ ; then LD_LIBRARY_PATH=$(CURDIR)/obj-$(DEB_HOST_MULTIARCH)/lib \
+ dh_auto_test --no-parallel -- \
; else echo "W: /dev/kfd unreadable: no available AMD GPU." \
; echo "W: tests skipped." \
; fi
@@ -60,8 +58,10 @@
execute_before_dh_install:
# fix interpreter path
sed -i '1s@^#!/usr/bin/env perl$$@#!/usr/bin/perl@' $(DTMP)/usr/bin/*
- # non FHS compliant location for hipVersion will change in the future.
- rm $(DTMP)/usr/bin/.hipVersion
# remove unnecessary DT_RUNPATH
find debian/ -name 'libhiprtc-builtins.so.*'
patchelf --remove-rpath $(DTMP)/usr/lib/*/libhiprtc-builtins.so.*
+ patchelf --remove-rpath $(DTMP)/usr/lib/*/libamdhip64.so.*
+ # rename .hipVersion
+ mkdir -p -- $(DTMP)/usr/share/hip
+ mv -- $(DTMP)/usr/bin/.hipVersion $(DTMP)/usr/share/hip/version
diff -Nru rocm-hipamd-5.2.3/debian/tests/control
rocm-hipamd-5.2.3/debian/tests/control
--- rocm-hipamd-5.2.3/debian/tests/control 1970-01-01 01:00:00.000000000
+0100
+++ rocm-hipamd-5.2.3/debian/tests/control 2023-03-10 23:38:51.000000000
+0100
@@ -0,0 +1,3 @@
+Tests: hipconfig, hipcc
+Depends: @
+Restrictions: superficial, skippable
diff -Nru rocm-hipamd-5.2.3/debian/tests/hipcc
rocm-hipamd-5.2.3/debian/tests/hipcc
--- rocm-hipamd-5.2.3/debian/tests/hipcc 1970-01-01 01:00:00.000000000
+0100
+++ rocm-hipamd-5.2.3/debian/tests/hipcc 2023-03-10 23:38:51.000000000
+0100
@@ -0,0 +1,32 @@
+#! /bin/sh
+set -e
+
+# Skip this test if no amdgpu is caught by the kernel
+test -d /sys/class/kfd || exit 77
+
+if [ "${AUTOPKGTEST_TMP}" = "" ]
+then
+ AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+ # Double quote below to expand the temporary directory variable now
+ # versus later is on purpose.
+ # shellcheck disable=SC2064
+ trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
+fi
+cd "$AUTOPKGTEST_TMP"
+
+# Superficial tests
+echo '$ hipcc --help'
+hipcc --help
+echo '$ hipcc --version'
+hipcc --version
+
+# Basic build test.
+cat > main.cpp << END
+int main(int argc, char **argv) { return (0); }
+END
+echo '$ cat main.cpp'
+cat main.cpp
+echo '$ hipcc main.cpp -o main'
+hipcc main.cpp -o main
+echo '$ ./main'
+./main
diff -Nru rocm-hipamd-5.2.3/debian/tests/hipconfig
rocm-hipamd-5.2.3/debian/tests/hipconfig
--- rocm-hipamd-5.2.3/debian/tests/hipconfig 1970-01-01 01:00:00.000000000
+0100
+++ rocm-hipamd-5.2.3/debian/tests/hipconfig 2023-03-10 23:38:51.000000000
+0100
@@ -0,0 +1,6 @@
+#! /bin/sh
+set -e
+# Skip this test if no amdgpu is caught by the kernel
+test -d /sys/class/kfd || exit 77
+# Actual test
+hipconfig