From ad786116740e9b0ee67a0e43243d6b3ae91fdaf6 Mon Sep 17 00:00:00 2001 From: Jason Bonnell <166553723+jbonnell-amd@users.noreply.github.com> Date: Mon, 6 Oct 2025 11:40:58 -0400 Subject: [PATCH] rocprofiler-systems Nightly and CI on Ubuntu Jammy/Noble on MI355 and MI325 (#997) * Initial steps added for rocprofiler-systems-continuous-integration.yml * Add new line to end of rocprofiler-systems-continuous-integration.yml * Fix matrix issue in rocprofiler-systems CI workflow * Update runner to use mi355 * Remove sudo from ROCm download step * Add Python venv * Try to install python venv * Add -y to pip venv install commands * Add shell: bash to download ROCm step * Fix issue in if statement * Fix typo in mv command * Fix mv command * Update paths * add directory in install step * Use default runner for now while debugging setup * Add set -e to steps * debug build step * Add amdgpu install step * remove working-directory from amdgpu install step * add path/ld lib path, add -S argument to run-ci.py * Fix typo in DCMAKE_PREFIX_PATH * Add DGPU_TARGETS to run-ci.py command * add Docker options, remove GPU_TARGETS * Install amd-smi-lib * Add DCMAKE_BUILD_TYPE, update path * Remove mkdir * Add build dynist cmake arguments * Update cmake arguments again * Add missing \ to run-ci.py command * add libdw dependency * Add later install step * Increase timeout of configure/build/test step * use 16 jobs to try and speed up pipeline time * Add GHCR image, remove TheRock tarball download step, minor changes for debugging * Add credentials to container portion of step * Add package read permissions to ubuntu step * Update tarball name * Increase jobs to 16, disable some tests for now due to timeouts * Modify to only include gpu tests * Fix configuration * Enable MPI on run-ci.py run * Add install MPI step, changed tests to be run * Enable OMPI flags, enable network counter access * Use new Docker image names, add privileged option to Docker * Change cmake build type * Add fail-fast false option for CI * Update ROCM_VERSION variable to reflect docker changes * Specify TARBALL_ROCM_VERSION as separate * Add MI325 to debug pipeline errors * Move location of env variables * Only test on jammy for now, run all tests to assess other issues * test with branch that contains fix for openmp * Exclude "ompvv" We will re-add one ticket is fixed. * Test: Disable USE_MPI * Replace TheRock ROCm install with rocm-dev for now * Try out MI355 noble and MI325 for jammy/noble * Update amdgpu step to support different ROCm versions * Remove unused env variables --------- Co-authored-by: David Galiffi --- ...rofiler-systems-continuous-integration.yml | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 .github/workflows/rocprofiler-systems-continuous-integration.yml diff --git a/.github/workflows/rocprofiler-systems-continuous-integration.yml b/.github/workflows/rocprofiler-systems-continuous-integration.yml new file mode 100644 index 0000000000..7dfbefba63 --- /dev/null +++ b/.github/workflows/rocprofiler-systems-continuous-integration.yml @@ -0,0 +1,154 @@ +name: rocprofiler-systems Continuous Integration +run-name: rocprofiler-systems-ci + +on: + schedule: + - cron: '0 6 * * *' + workflow_dispatch: + push: + branches: [ develop ] + paths: + - '.github/workflows/rocprofiler-systems-continuous-integration.yml' + - 'projects/rocprofiler-systems/**' + - '!projects/rocprofiler-systems/*.md' + - '!projects/rocprofiler-systems/docs/**' + - '!projects/rocprofiler-systems/source/docs/**' + - '!projects/rocprofiler-systems/source/python/gui/**' + - '!projects/rocprofiler-systems/docker/**' + - '!projects/rocprofiler-systems/.wordlist.txt' + - '!projects/rocprofiler-systems/CMakePresets.json' + pull_request: + paths: + - '.github/workflows/rocprofiler-systems-continuous-integration.yml' + - 'projects/rocprofiler-systems/**' + - '!projects/rocprofiler-systems/*.md' + - '!projects/rocprofiler-systems/docs/**' + - '!projects/rocprofiler-systems/source/docs/**' + - '!projects/rocprofiler-systems/source/python/gui/**' + - '!projects/rocprofiler-systems/docker/**' + - '!projects/rocprofiler-systems/.wordlist.txt' + - '!projects/rocprofiler-systems/CMakePresets.json' + +env: + ROCPROFSYS_CI: ON + ROCPROFSYS_TMPDIR: "%env{PWD}%/testing-tmp" + ROCM_PATH: "/opt/rocm" + ROCM_VERSION: "7.0.0" + +jobs: + ubuntu: + name: Ubuntu ${{ matrix.system.os-release }} • ${{ matrix.system.arch }} + strategy: + fail-fast: false + matrix: + system: + # MI355 + - { os-release: '22.04', gpu: 'mi355', arch: 'gfx950', runner: 'linux-mi355-1gpu-ossci-rocm' } + - { os-release: '24.04', gpu: 'mi355', arch: 'gfx950', runner: 'linux-mi355-1gpu-ossci-rocm' } + # MI325 + - { os-release: '22.04', gpu: 'mi325', arch: 'gfx94X', runner: 'linux-mi325-1gpu-ossci-rocm' } + - { os-release: '24.04', gpu: 'mi325', arch: 'gfx94X', runner: 'linux-mi325-1gpu-ossci-rocm' } + runs-on: ${{ matrix.system.runner }} + env: + HIP_PLATFORM: "amd" + ROCPROFSYS_CI: ON + OMPI_ALLOW_RUN_AS_ROOT: 1 + OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 + permissions: + packages: read + container: + image: ghcr.io/rocm/rocprofiler-ubuntu:${{ matrix.system.os-release }}-systems-ci-${{ matrix.system.arch }} + options: + --privileged + --ipc host + --group-add video + --device /dev/kfd + --device /dev/dri + --cap-add CAP_SYS_ADMIN + steps: + - uses: actions/checkout@v5 + with: + sparse-checkout: projects/rocprofiler-systems/ + + - name: Setup Environment + id: setup_env + run: | + if [ '${{ github.event_name }}' = 'schedule' ]; then + MODE=Nightly + else + MODE=Continuous + fi + echo "mode=${MODE}" >> $GITHUB_OUTPUT + + if [ '${{ matrix.system.os-release }}' = '24.04']; then + CODE_NAME=noble + else + CODE_NAME=jammy + fi + echo "code_name=${CODE_NAME}" >> $GITHUB_OUTPUT + + - name: Install amdgpu and dependencies + shell: bash + run: | + ROCM_MAJOR=$(echo ${{ env.ROCM_VERSION }} | sed 's/\./ /g' | awk '{print $1}') + ROCM_MINOR=$(echo ${{ env.ROCM_VERSION }} | sed 's/\./ /g' | awk '{print $2}') + ROCM_VERSN=$(( (${ROCM_MAJOR}*10000)+(${ROCM_MINOR}*100) )) + wget -N -P /tmp/ https://repo.radeon.com/amdgpu-install/${ROCM_MAJOR}.${ROCM_MINOR}/ubuntu/${{ steps.setup_env.outputs.code_name }}/amdgpu-install_${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1_all.deb + apt-get install -y /tmp/amdgpu-install_${ROCM_MAJOR}.${ROCM_MINOR}.${ROCM_VERSN}-1_all.deb + apt-get update + apt install -y amd-smi-lib libdw-dev rocjpeg-test rocdecode-test rccl-dev + echo "✅ amdgpu and ROCm dependencies Installed!" + + - name: Install MPI + run: | + apt install -y libopenmpi-dev + echo "✅ MPI Installed!" + + # TODO: Remove this and replace with TheRock tarball when runtime error is fixed + - name: Install ROCm + run: | + apt install -y rocm-dev + echo "✅ ROCm Installation Complete!" + + # TODO: Enable this step and remove the above step once runtime error is fixed + - name: Install Latest Nightly ROCm + if: false + run: | + set -e + TARBALL_ROCM_VERSION=$(ls /opt/*.tar.gz | grep -Eo '*([0-9]\.[0-9]\.[0-9])*') + tar -xf ${{ env.ROCM_PATH }}-${TARBALL_ROCM_VERSION}-${{ matrix.system.arch }}.tar.gz -C ${{ env.ROCM_PATH }}-${{ env.ROCM_VERSION }} + ln -s ${{ env.ROCM_PATH }}-${{ env.ROCM_VERSION }} ${{ env.ROCM_PATH }} + echo "ROCm installed to: ${{ env.ROCM_PATH }}" + echo "✅ ROCm Installation Complete!" + + - name: Configure, Build, and Test + timeout-minutes: 30 + working-directory: projects/rocprofiler-systems + run: | + set -e + git config --global --add safe.directory ${GITHUB_WORKSPACE} + git config --global --add safe.directory ${PWD} + PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH \ + LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:$LD_LIBRARY_PATH \ + python3 ./scripts/run-ci.py -B build \ + --name ${{ github.repository }}-${{ github.ref_name }}-ubuntu-${{ matrix.system.os-release }}-${{ matrix.system.gpu }} \ + --build-jobs 16 \ + --site ${{ matrix.system.runner }} \ + --mode ${{ steps.setup_env.outputs.mode }} \ + -- \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_PREFIX_PATH=${{ env.ROCM_PATH }} \ + -DCMAKE_INSTALL_PREFIX=/opt/rocprofiler-systems \ + -DROCPROFSYS_BUILD_DYNINST=ON \ + -DROCPROFSYS_BUILD_BOOST=ON \ + -DROCPROFSYS_BUILD_TBB=ON \ + -DROCPROFSYS_BUILD_ELFUTILS=ON \ + -DROCPROFSYS_BUILD_LIBIBERTY=ON \ + -DROCPROFSYS_BUILD_CI=ON \ + -DROCPROFSYS_BUILD_TESTING=ON \ + -DROCPROFSYS_USE_PYTHON=ON \ + -DROCPROFSYS_USE_ROCM=ON \ + -DROCPROFSYS_MAX_THREADS=64 \ + -- \ + -L "rocm|network" \ + -LE "rccl|runtime|ompvv"