From bc94c018c4028a62554c311e2b1abbc1b2b67201 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 14 Feb 2025 15:22:50 -0500 Subject: ci: Update HIP image to ROCm 6.3 on Ubuntu 24.04 The problem described in commit ec682ff22a (ci: Update to ROCm 6 HIP on Fedora 41, 2024-12-02, v3.31.2~3^2) occurs here too. Move the CI work directory to a path without spaces. Issue: #25932 --- .gitlab-ci.yml | 8 +++---- .gitlab/ci/configure_hip5.5_nvidia.cmake | 4 ---- .gitlab/ci/configure_hip5.5_radeon.cmake | 4 ---- .gitlab/ci/configure_hip6.3_nvidia.cmake | 4 ++++ .gitlab/ci/configure_hip6.3_radeon.cmake | 4 ++++ .gitlab/ci/docker/hip5.5/Dockerfile | 37 ------------------------------ .gitlab/ci/docker/hip5.5/deps_packages.lst | 21 ----------------- .gitlab/ci/docker/hip5.5/docker-clean | 0 .gitlab/ci/docker/hip5.5/dpkg-exclude | 21 ----------------- .gitlab/ci/docker/hip5.5/install_deps.sh | 5 ---- .gitlab/ci/docker/hip6.3/Dockerfile | 37 ++++++++++++++++++++++++++++++ .gitlab/ci/docker/hip6.3/deps_packages.lst | 23 +++++++++++++++++++ .gitlab/ci/docker/hip6.3/docker-clean | 0 .gitlab/ci/docker/hip6.3/dpkg-exclude | 21 +++++++++++++++++ .gitlab/ci/docker/hip6.3/install_deps.sh | 5 ++++ .gitlab/ci/env_hip5.5_nvidia.sh | 4 ---- .gitlab/ci/env_hip6.3_nvidia.sh | 4 ++++ .gitlab/os-linux.yml | 18 ++++++++------- 18 files changed, 112 insertions(+), 108 deletions(-) delete mode 100644 .gitlab/ci/configure_hip5.5_nvidia.cmake delete mode 100644 .gitlab/ci/configure_hip5.5_radeon.cmake create mode 100644 .gitlab/ci/configure_hip6.3_nvidia.cmake create mode 100644 .gitlab/ci/configure_hip6.3_radeon.cmake delete mode 100644 .gitlab/ci/docker/hip5.5/Dockerfile delete mode 100644 .gitlab/ci/docker/hip5.5/deps_packages.lst delete mode 100644 .gitlab/ci/docker/hip5.5/docker-clean delete mode 100644 .gitlab/ci/docker/hip5.5/dpkg-exclude delete mode 100755 .gitlab/ci/docker/hip5.5/install_deps.sh create mode 100644 .gitlab/ci/docker/hip6.3/Dockerfile create mode 100644 .gitlab/ci/docker/hip6.3/deps_packages.lst create mode 100644 .gitlab/ci/docker/hip6.3/docker-clean create mode 100644 .gitlab/ci/docker/hip6.3/dpkg-exclude create mode 100755 .gitlab/ci/docker/hip6.3/install_deps.sh delete mode 100644 .gitlab/ci/env_hip5.5_nvidia.sh create mode 100644 .gitlab/ci/env_hip6.3_nvidia.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 124bf7e..82d0968 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -439,9 +439,9 @@ t:cuda12.6-clang: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:hip5.5-nvidia: +t:hip6.3-nvidia: extends: - - .hip5.5_nvidia + - .hip6.3_nvidia - .cmake_test_linux_release - .linux_x86_64_tags_cuda - .run_dependent @@ -449,9 +449,9 @@ t:hip5.5-nvidia: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:hip5.5-radeon: +t:hip6.3-radeon: extends: - - .hip5.5_radeon + - .hip6.3_radeon - .cmake_test_linux_release - .linux_x86_64_tags_radeon - .run_dependent diff --git a/.gitlab/ci/configure_hip5.5_nvidia.cmake b/.gitlab/ci/configure_hip5.5_nvidia.cmake deleted file mode 100644 index 036a227..0000000 --- a/.gitlab/ci/configure_hip5.5_nvidia.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(CMake_TEST_HIP "nvidia" CACHE BOOL "") -set(CMake_TEST_HIP_STANDARDS "98;11;14;17" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_hip5.5_radeon.cmake b/.gitlab/ci/configure_hip5.5_radeon.cmake deleted file mode 100644 index 06e47c9..0000000 --- a/.gitlab/ci/configure_hip5.5_radeon.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(CMake_TEST_HIP "amd" CACHE BOOL "") -set(CMake_TEST_CUDA_STANDARDS "98;11;14;17;20;23;26" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_hip6.3_nvidia.cmake b/.gitlab/ci/configure_hip6.3_nvidia.cmake new file mode 100644 index 0000000..036a227 --- /dev/null +++ b/.gitlab/ci/configure_hip6.3_nvidia.cmake @@ -0,0 +1,4 @@ +set(CMake_TEST_HIP "nvidia" CACHE BOOL "") +set(CMake_TEST_HIP_STANDARDS "98;11;14;17" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_hip6.3_radeon.cmake b/.gitlab/ci/configure_hip6.3_radeon.cmake new file mode 100644 index 0000000..06e47c9 --- /dev/null +++ b/.gitlab/ci/configure_hip6.3_radeon.cmake @@ -0,0 +1,4 @@ +set(CMake_TEST_HIP "amd" CACHE BOOL "") +set(CMake_TEST_CUDA_STANDARDS "98;11;14;17;20;23;26" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/docker/hip5.5/Dockerfile b/.gitlab/ci/docker/hip5.5/Dockerfile deleted file mode 100644 index 3a4aa53..0000000 --- a/.gitlab/ci/docker/hip5.5/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# syntax=docker/dockerfile:1 - -ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:5.5 - -FROM ${BASE_IMAGE} AS cuda-keyring -ADD https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb /root/ -RUN --mount=type=tmpfs,target=/var/log \ - dpkg -i /root/cuda-keyring_1.1-1_all.deb \ - && rm /root/cuda-keyring_1.1-1_all.deb - -FROM cuda-keyring AS apt-cache -# Populate APT cache w/ the fresh metadata and prefetch packages. -# Use an empty `docker-clean` file to "hide" the image-provided -# file to disallow removing packages after `apt-get` operations. -RUN --mount=type=tmpfs,target=/var/log \ - --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \ - --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ - apt-get update \ - && apt-get --download-only -y install $(grep -h '^[^#]\+$' /root/*.lst) - -FROM cuda-keyring -MAINTAINER Brad King - -ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility -ENV NVIDIA_REQUIRE_CUDA=cuda>=11.8 -ENV NVIDIA_VISIBLE_DEVICES=all -ENV PATH="/opt/rocm/bin:$PATH" - -RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \ - --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ - --mount=type=bind,source=dpkg-exclude,target=/etc/dpkg/dpkg.cfg.d/exclude \ - --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \ - --mount=type=cache,from=apt-cache,source=/var/lib/apt/lists,target=/var/lib/apt/lists \ - --mount=type=cache,from=apt-cache,source=/var/cache/apt,target=/var/cache/apt,sharing=private \ - --mount=type=tmpfs,target=/var/log \ - --mount=type=tmpfs,target=/tmp \ - sh /root/install_deps.sh diff --git a/.gitlab/ci/docker/hip5.5/deps_packages.lst b/.gitlab/ci/docker/hip5.5/deps_packages.lst deleted file mode 100644 index 3276055..0000000 --- a/.gitlab/ci/docker/hip5.5/deps_packages.lst +++ /dev/null @@ -1,21 +0,0 @@ -# Install development tools. -g++ -curl -git - -# NVIDIA CUDA Compiler -cuda-keyring -cuda-nvcc-11-8 -cuda-profiler-api-11-8 - -# NVIDIA CUDA Toolkit -# These are not needed for HIP, but having them in -# the environment allows us to run CUDA tests too. -cuda-nvrtc-dev-11-8 -cuda-nvtx-11-8 -libcublas-dev-11-8 -libcufft-dev-11-8 -libcurand-dev-11-8 -libcusolver-dev-11-8 -libcusparse-dev-11-8 -libnpp-dev-11-8 diff --git a/.gitlab/ci/docker/hip5.5/docker-clean b/.gitlab/ci/docker/hip5.5/docker-clean deleted file mode 100644 index e69de29..0000000 diff --git a/.gitlab/ci/docker/hip5.5/dpkg-exclude b/.gitlab/ci/docker/hip5.5/dpkg-exclude deleted file mode 100644 index 60b6565..0000000 --- a/.gitlab/ci/docker/hip5.5/dpkg-exclude +++ /dev/null @@ -1,21 +0,0 @@ -# Drop all man pages -path-exclude=/usr/share/man/* - -# Drop all info pages -path-exclude=/usr/share/info/* - -# Drop all README files except from the some packages -path-exclude=/usr/**/*README* -path-include=/usr/share/devscripts/templates/README.mk-build-deps -path-include=/usr/share/equivs/template/debian/README.Debian.in - -# Drop all translations -path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo - -# Drop all documentation ... -path-exclude=/usr/share/doc/* -path-exclude=/usr/share/doc-base/* -path-exclude=/usr/share/gtk-doc/* - -# Per package excludes -path-exclude=/usr/share/gnupg/help.*.txt diff --git a/.gitlab/ci/docker/hip5.5/install_deps.sh b/.gitlab/ci/docker/hip5.5/install_deps.sh deleted file mode 100755 index d1c8aed..0000000 --- a/.gitlab/ci/docker/hip5.5/install_deps.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -set -e - -apt-get install -y $(grep '^[^#]\+$' /root/deps_packages.lst) diff --git a/.gitlab/ci/docker/hip6.3/Dockerfile b/.gitlab/ci/docker/hip6.3/Dockerfile new file mode 100644 index 0000000..a9f8303 --- /dev/null +++ b/.gitlab/ci/docker/hip6.3/Dockerfile @@ -0,0 +1,37 @@ +# syntax=docker/dockerfile:1 + +ARG BASE_IMAGE=rocm/dev-ubuntu-24.04:6.3.2 + +FROM ${BASE_IMAGE} AS cuda-keyring +ADD https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb /root/ +RUN --mount=type=tmpfs,target=/var/log \ + dpkg -i /root/cuda-keyring_1.1-1_all.deb \ + && rm /root/cuda-keyring_1.1-1_all.deb + +FROM cuda-keyring AS apt-cache +# Populate APT cache w/ the fresh metadata and prefetch packages. +# Use an empty `docker-clean` file to "hide" the image-provided +# file to disallow removing packages after `apt-get` operations. +RUN --mount=type=tmpfs,target=/var/log \ + --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \ + --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ + apt-get update \ + && apt-get --download-only -y install $(grep -h '^[^#]\+$' /root/*.lst) + +FROM cuda-keyring +MAINTAINER Brad King + +ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility +ENV NVIDIA_REQUIRE_CUDA=cuda>=12.6 +ENV NVIDIA_VISIBLE_DEVICES=all +ENV PATH="/opt/rocm/bin:$PATH" + +RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \ + --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ + --mount=type=bind,source=dpkg-exclude,target=/etc/dpkg/dpkg.cfg.d/exclude \ + --mount=type=bind,source=docker-clean,target=/etc/apt/apt.conf.d/docker-clean \ + --mount=type=cache,from=apt-cache,source=/var/lib/apt/lists,target=/var/lib/apt/lists \ + --mount=type=cache,from=apt-cache,source=/var/cache/apt,target=/var/cache/apt,sharing=private \ + --mount=type=tmpfs,target=/var/log \ + --mount=type=tmpfs,target=/tmp \ + sh /root/install_deps.sh diff --git a/.gitlab/ci/docker/hip6.3/deps_packages.lst b/.gitlab/ci/docker/hip6.3/deps_packages.lst new file mode 100644 index 0000000..2ecf81e --- /dev/null +++ b/.gitlab/ci/docker/hip6.3/deps_packages.lst @@ -0,0 +1,23 @@ +# Install development tools. +g++ +curl +git + +# NVIDIA CUDA Compiler +cuda-keyring +cuda-nvcc-12-6 +cuda-profiler-api-12-6 + +# NVIDIA CUDA Toolkit +# These are not needed for HIP, but having them in +# the environment allows us to run CUDA tests too. +cuda-nvrtc-dev-12-6 +cuda-nvtx-12-6 +cuda-opencl-dev-12-6 +libcublas-dev-12-6 +libcufft-dev-12-6 +libcurand-dev-12-6 +libcusolver-dev-12-6 +libcusparse-dev-12-6 +libnpp-dev-12-6 +libnvjitlink-dev-12-6 diff --git a/.gitlab/ci/docker/hip6.3/docker-clean b/.gitlab/ci/docker/hip6.3/docker-clean new file mode 100644 index 0000000..e69de29 diff --git a/.gitlab/ci/docker/hip6.3/dpkg-exclude b/.gitlab/ci/docker/hip6.3/dpkg-exclude new file mode 100644 index 0000000..60b6565 --- /dev/null +++ b/.gitlab/ci/docker/hip6.3/dpkg-exclude @@ -0,0 +1,21 @@ +# Drop all man pages +path-exclude=/usr/share/man/* + +# Drop all info pages +path-exclude=/usr/share/info/* + +# Drop all README files except from the some packages +path-exclude=/usr/**/*README* +path-include=/usr/share/devscripts/templates/README.mk-build-deps +path-include=/usr/share/equivs/template/debian/README.Debian.in + +# Drop all translations +path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo + +# Drop all documentation ... +path-exclude=/usr/share/doc/* +path-exclude=/usr/share/doc-base/* +path-exclude=/usr/share/gtk-doc/* + +# Per package excludes +path-exclude=/usr/share/gnupg/help.*.txt diff --git a/.gitlab/ci/docker/hip6.3/install_deps.sh b/.gitlab/ci/docker/hip6.3/install_deps.sh new file mode 100755 index 0000000..d1c8aed --- /dev/null +++ b/.gitlab/ci/docker/hip6.3/install_deps.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +apt-get install -y $(grep '^[^#]\+$' /root/deps_packages.lst) diff --git a/.gitlab/ci/env_hip5.5_nvidia.sh b/.gitlab/ci/env_hip5.5_nvidia.sh deleted file mode 100644 index 67d1ef2..0000000 --- a/.gitlab/ci/env_hip5.5_nvidia.sh +++ /dev/null @@ -1,4 +0,0 @@ -export HIP_PLATFORM=nvidia -export CUDA_PATH=/usr/local/cuda-11.8 -export PATH=/usr/local/cuda-11.8/bin:$PATH -export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64 diff --git a/.gitlab/ci/env_hip6.3_nvidia.sh b/.gitlab/ci/env_hip6.3_nvidia.sh new file mode 100644 index 0000000..3b326cb --- /dev/null +++ b/.gitlab/ci/env_hip6.3_nvidia.sh @@ -0,0 +1,4 @@ +export HIP_PLATFORM=nvidia +export CUDA_PATH=/usr/local/cuda-12.6 +export PATH=/usr/local/cuda-12.6/bin:$PATH +export LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64 diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index eacacad..461b34e 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -434,19 +434,21 @@ ### HIP builds -.hip5.5: - image: "kitware/cmake:ci-hip5.5-x86_64-2023-09-18" +.hip6.3: + image: "kitware/cmake:ci-hip6.3-x86_64-2025-02-14" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" CMAKE_ARCH: x86_64 CTEST_LABELS: "HIP" -.hip5.5_radeon: - extends: .hip5.5 +.hip6.3_radeon: + extends: .hip6.3 variables: - CMAKE_CONFIGURATION: hip5.5_radeon + # FIXME(rocclr): device modules fail loading from binaries in paths with spaces + GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake-ci" + CMAKE_CONFIGURATION: hip6.3_radeon CMAKE_GENERATOR: "Ninja Multi-Config" .debian12_hip_radeon: @@ -463,11 +465,11 @@ CMAKE_CONFIGURATION: fedora41_hip_radeon CTEST_LABELS: "HIP" -.hip5.5_nvidia: - extends: .hip5.5 +.hip6.3_nvidia: + extends: .hip6.3 variables: - CMAKE_CONFIGURATION: hip5.5_nvidia + CMAKE_CONFIGURATION: hip6.3_nvidia CTEST_LABELS: "HIP" ### C++ modules -- cgit v0.12