From 46dbb7555b44bc71a75f00875325f169fce30f0f Mon Sep 17 00:00:00 2001 From: Riley Dixon Date: Fri, 2 Jan 2026 16:55:56 -0700 Subject: [PATCH 1/8] CI: Cleanup self-hosted runners at the end of each workflow. Self-hosted runners apparently do not automatically perform cleanup steps of the GITHUB_WORKSPACE at the end of the job. --- .github/workflows/build-ais.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-ais.yml b/.github/workflows/build-ais.yml index 989b6541..80f8b707 100644 --- a/.github/workflows/build-ais.yml +++ b/.github/workflows/build-ais.yml @@ -454,6 +454,9 @@ jobs: if: ${{ always() }} run: | docker stop ${AIS_CONTAINER_NAME} + - name: Cleanup self-hosted runner workspace + if: ${{ always() }} + run: rm -rf ${GITHUB_WORKSPACE}/* ${GITHUB_WORKSPACE}/.* compile_on_NVIDIA: runs-on: [ubuntu-24.04] strategy: From ae07efe1749d597a6ee258c6f08d5f9ea2f14fc4 Mon Sep 17 00:00:00 2001 From: Riley Dixon Date: Fri, 2 Jan 2026 15:13:37 -0700 Subject: [PATCH 2/8] CI: Reuse the hipFile build directory. The goal is to avoid redundant compile steps for executing the hipFile system tests. It is not trivial to configure CTest in CMake to run a GTest executable that has been moved outside of the build tree. The purpose of such a configuration is to have an installable test package to avoid needing to recompile hipFile for running system tests. For now, we will just reuse the build directory. This is for simplicity rather than just copying over a subset of the build directory. Notably: 1) Copying the CTestTestfiles.cmake in the root of the build directory. 2) The test subdirectory comprises the bulk of the build directory's overall size. --- .github/workflows/build-ais.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build-ais.yml b/.github/workflows/build-ais.yml index 80f8b707..11ff7bee 100644 --- a/.github/workflows/build-ais.yml +++ b/.github/workflows/build-ais.yml @@ -220,6 +220,22 @@ jobs: if-no-files-found: error retention-days: 1 compression-level: 0 + # CTestTestfiles.cmake hardcodes the absolute path of the GTest executables + # in the build directory. CTest relies on this metadata for execution. It is not + # trivial to modify this metadata, otherwise an installable test package could be + # used. For now, reuse the build directory. + - name: Copy hipFile build directory out of the container + run: | + docker cp \ + "${AIS_CONTAINER_NAME}:/ais/hipFile/build" \ + ${GITHUB_WORKSPACE}/hipfile-build-dir + - name: Upload runtime hipFile Package as an Artifact + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0 + with: + name: hipfile-build-dir-${{ inputs.platform }} + path: ${{ github.workspace }}/hipfile-build-dir + if-no-files-found: error + retention-days: 1 - name: Clean CMake build directories run: | docker exec \ @@ -324,6 +340,11 @@ jobs: repository: ROCm/fio ref: hipFile path: fio + - name: Download hipFile build directory + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 + with: + name: hipfile-build-dir-${{ inputs.platform }} + path: ${{ github.workspace }}/hipfile-build-dir - name: Authenticating to GitHub Container Registry uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef #v3.6.0 with: From caaf1b97a7ef7c260d351c3c71ddfd803cc3a7d7 Mon Sep 17 00:00:00 2001 From: Riley Dixon Date: Fri, 2 Jan 2026 15:30:37 -0700 Subject: [PATCH 3/8] CI: Install the hipFile packages for system tests. FIO will need the development package to build with hipFile support. The hipFile GTest executables are TBD. --- .github/workflows/build-ais.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/build-ais.yml b/.github/workflows/build-ais.yml index 11ff7bee..37c85d62 100644 --- a/.github/workflows/build-ais.yml +++ b/.github/workflows/build-ais.yml @@ -340,6 +340,14 @@ jobs: repository: ROCm/fio ref: hipFile path: fio + - name: Download hipFile runtime package + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 + with: + name: ${{ needs.compile_on_AMD.outputs.ais_hipfile_pkg_filename }} + - name: Download hipFile development package + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 + with: + name: ${{ needs.compile_on_AMD.outputs.ais_hipfile_pkg_dev_filename }} - name: Download hipFile build directory uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 #v7.0.0 with: @@ -380,6 +388,32 @@ jobs: mkdir /ais/hipFile/build mkdir /ais/fio/build ' + - name: Copy the hipFile packages into the container + run: | + docker cp \ + ${GITHUB_WORKSPACE}/${{ needs.compile_on_AMD.outputs.ais_hipfile_pkg_filename }} \ + "${AIS_CONTAINER_NAME}:/root" + docker cp \ + ${GITHUB_WORKSPACE}/${{ needs.compile_on_AMD.outputs.ais_hipfile_pkg_dev_filename }} \ + "${AIS_CONTAINER_NAME}:/root" + - name: Install the hipFile packages + run: | + docker exec \ + -t \ + -w /root \ + ${AIS_CONTAINER_NAME} \ + /bin/bash -c ' + ${{ + format( + inputs.platform == 'ubuntu' && 'apt install -y ./{0} ./{1}' || + inputs.platform == 'rocky' && 'dnf install -y ./{0} ./{1}' || + inputs.platform == 'suse' && 'zypper install -y --allow-unsigned-rpm ./{0} ./{1}' || + 'echo "Unknown platform."; exit 1', + needs.compile_on_AMD.outputs.ais_hipfile_pkg_filename, + needs.compile_on_AMD.outputs.ais_hipfile_pkg_dev_filename + ) + }} + ' - name: Generate build files for hipFile targeting the AMD platform (amdclang++) run: | docker exec \ From 9c89853928db4115467764840db47e335e49a432 Mon Sep 17 00:00:00 2001 From: Riley Dixon Date: Fri, 2 Jan 2026 15:39:15 -0700 Subject: [PATCH 4/8] CI: Copy the hipFile build directory into the container. --- .github/workflows/build-ais.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-ais.yml b/.github/workflows/build-ais.yml index 37c85d62..63729fe6 100644 --- a/.github/workflows/build-ais.yml +++ b/.github/workflows/build-ais.yml @@ -414,6 +414,19 @@ jobs: ) }} ' + # GitHub Build Artifacts do not preserve file permissions, namely the executable bit. + - name: Fix file permissions on GTest executables + run: | + chmod a+x \ + ${GITHUB_WORKSPACE}/hipfile-build-dir/test/hipfile_system_tests \ + ${GITHUB_WORKSPACE}/hipfile-build-dir/test/amd_detail/batch_mt \ + ${GITHUB_WORKSPACE}/hipfile-build-dir/test/amd_detail/state_mt \ + ${GITHUB_WORKSPACE}/hipfile-build-dir/examples/aiscp/aiscp + - name: Copy the hipFile build directory into the container + run: | + docker cp \ + ${GITHUB_WORKSPACE}/hipfile-build-dir/. \ + "${AIS_CONTAINER_NAME}:/ais/hipFile/build" - name: Generate build files for hipFile targeting the AMD platform (amdclang++) run: | docker exec \ From de491024863e55de6317c4df70f76824ce5599b2 Mon Sep 17 00:00:00 2001 From: Riley Dixon Date: Mon, 5 Jan 2026 12:09:20 -0700 Subject: [PATCH 5/8] CI: Remove hipFile compile steps in system tests. --- .github/workflows/build-ais.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/build-ais.yml b/.github/workflows/build-ais.yml index 63729fe6..25d0398a 100644 --- a/.github/workflows/build-ais.yml +++ b/.github/workflows/build-ais.yml @@ -427,29 +427,6 @@ jobs: docker cp \ ${GITHUB_WORKSPACE}/hipfile-build-dir/. \ "${AIS_CONTAINER_NAME}:/ais/hipFile/build" - - name: Generate build files for hipFile targeting the AMD platform (amdclang++) - run: | - docker exec \ - -t \ - -w /ais/hipFile/build \ - ${AIS_CONTAINER_NAME} \ - /bin/bash -c ' - cmake \ - -DCMAKE_CXX_COMPILER=amdclang++ \ - -DCMAKE_CXX_FLAGS="-Werror" \ - -DCMAKE_HIP_PLATFORM=amd \ - -DAIS_BUILD_DOCS=ON \ - .. - ' - - name: Build hipFile for the AMD platform (amdclang++) - run: | - docker exec \ - -t \ - -w /ais/hipFile/build \ - ${AIS_CONTAINER_NAME} \ - /bin/bash -c ' - cmake --build . --parallel - ' - name: Run hipFile system tests for the AMD platform (amdclang++) run: | docker exec \ From dadaa9c5b57da18eefbf755fb34b667d089846a6 Mon Sep 17 00:00:00 2001 From: Riley Dixon Date: Tue, 6 Jan 2026 14:13:41 -0700 Subject: [PATCH 6/8] CI: Log hipFile pkg contents after creation This is to assist with debugging to ensure the right install paths are being used. dpkg does not like having -I and -c being provided at the same time. --- .github/workflows/build-ais.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-ais.yml b/.github/workflows/build-ais.yml index 25d0398a..aac32081 100644 --- a/.github/workflows/build-ais.yml +++ b/.github/workflows/build-ais.yml @@ -160,14 +160,16 @@ jobs: echo "Runtime Package:" ${{ format( - inputs.platform == 'ubuntu' && 'dpkg-deb -I {0}' || 'rpm -qpi --requires {0}', + inputs.platform == 'ubuntu' && 'dpkg-deb -I {0} && dpkg-deb -c {0}' || + 'rpm -qpil --requires {0}', steps.pkg-metadata.outputs.AIS_HIPFILE_PKG_FILENAME ) }} echo -e "\n\nDevelopment Package:" ${{ format( - inputs.platform == 'ubuntu' && 'dpkg-deb -I {0}' || 'rpm -qpi --requires {0}', + inputs.platform == 'ubuntu' && 'dpkg-deb -I {0} && dpkg-deb -c {0}' || + 'rpm -qpil --requires {0}', steps.pkg-metadata.outputs.AIS_HIPFILE_PKG_DEV_FILENAME ) }} From 7a18ca0ea1ac33d3c307096fa045129041e333e2 Mon Sep 17 00:00:00 2001 From: Riley Dixon Date: Mon, 5 Jan 2026 17:23:45 -0700 Subject: [PATCH 7/8] CMake: Set hipFile's install path to /opt/rocm. --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d210fbe6..2fed842e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,6 +117,17 @@ list(APPEND CMAKE_PREFIX_PATH /opt/rocm/hip ) +# Set hipFile Install Path to the ROCm directory +# Note: CMAKE_INSTALL_PREFIX is set to a default by project(). +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${ROCM_PATH}" CACHE PATH "The path where hipFile should be installed" FORCE) +endif() + +# Fix library install directory to "lib" to be inline with the rest of ROCm +# Note: If testing is enabled, installing GTest calls GNUInstallDirs which will +# set this before ROCMInstallTargets can set it. +set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Directory name for installed ROCm libraries") + #----------------------------------------------------------------------------- # Import useful things for later #----------------------------------------------------------------------------- From 2d4dd7227e837cddc37227a1a90bc3ed4f5dd465 Mon Sep 17 00:00:00 2001 From: Riley Dixon Date: Mon, 5 Jan 2026 13:26:43 -0700 Subject: [PATCH 8/8] CI-FIO: Compile & Link against the installed hipFile library. --- .github/workflows/build-ais.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-ais.yml b/.github/workflows/build-ais.yml index aac32081..6fa3f98a 100644 --- a/.github/workflows/build-ais.yml +++ b/.github/workflows/build-ais.yml @@ -469,8 +469,8 @@ jobs: HIPFILE=/ais/hipFile \ HIPFILELIB=${HIPFILE}/build/src/amd_detail/ \ HIP_PLATFORM=amd \ - CFLAGS="-I${ROCM}/include -I${HIPFILE}/include" \ - LDFLAGS="-L${ROCM}/lib -L${HIPFILELIB} -Wl,-rpath,${HIPFILELIB}" \ + CFLAGS="-I${ROCM}/include" \ + LDFLAGS="-L${ROCM}/lib -Wl,-rpath,${ROCM}/lib" \ ../configure --enable-libhipfile ' - name: Build fio