Browse Source

ci: Add HIP job based on Debian image

The Debian package for `hipcc` organizes the `hip-lang` cmake package
differently from the official ROCm base images.  Cover it separately.

Issue: #24562
Brad King 2 years ago
parent
commit
1177d5c127

+ 10 - 0
.gitlab-ci.yml

@@ -195,6 +195,16 @@ t:debian12-makefiles-clang:
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
 
+t:debian12-hip-radeon:
+    extends:
+        - .debian12_hip_radeon
+        - .cmake_test_linux_release
+        - .linux_x86_64_tags_radeon
+        - .run_dependent
+        - .needs_centos6_x86_64
+    variables:
+        CMAKE_CI_NO_MR: "true"
+
 t:fedora38-ninja-clang:
     extends:
         - .fedora38_ninja_clang

+ 3 - 0
.gitlab/ci/configure_debian12_hip_radeon.cmake

@@ -0,0 +1,3 @@
+set(CMake_TEST_HIP "ON" CACHE BOOL "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")

+ 9 - 0
.gitlab/ci/env_debian12_hip_radeon.sh

@@ -0,0 +1,9 @@
+export HIPCXX=/usr/bin/clang++-15
+export HIPFLAGS='--rocm-path=/usr --rocm-device-lib-path=/usr/lib/x86_64-linux-gnu/amdgcn/bitcode'
+
+# FIXME(debian): Clang is supposed to automatically parse a HIP version file.
+# The ROCm installer places it at '$prefix/bin/.hipVersion', but the package
+# on Debian moves it to '$prefix/share/hip/version'.  llvm-toolchain package
+# version 15.0.7-4 has 'debian/patches/amdgpu/usr-search-paths.patch' for this,
+# but Debian 12 currently provides version 15.0.6-4 without the patch.
+export HIPFLAGS="$HIPFLAGS --hip-version=5.2"

+ 7 - 0
.gitlab/os-linux.yml

@@ -359,6 +359,13 @@
         CMAKE_CONFIGURATION: hip5.5_radeon
         CMAKE_GENERATOR: "Ninja Multi-Config"
 
+.debian12_hip_radeon:
+    extends: .debian12
+
+    variables:
+        CMAKE_CONFIGURATION: debian12_hip_radeon
+        CTEST_LABELS: "HIP"
+
 ### C++ modules
 
 .gcc_cxx_modules_x86_64: