From 765d9026c71cd1f0e01e52f704a4f107ecb9e482 Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Tue, 14 Oct 2025 13:21:55 -0700 Subject: [PATCH] [CI][rocprofiler-sdk] Workflow improvements (#1341) --- .../rocprofiler-sdk-code_coverage.yml | 34 +++++++++++++++++-- ...rocprofiler-sdk-continuous_integration.yml | 15 ++++---- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rocprofiler-sdk-code_coverage.yml b/.github/workflows/rocprofiler-sdk-code_coverage.yml index 2fb0600ad6..9da9675761 100644 --- a/.github/workflows/rocprofiler-sdk-code_coverage.yml +++ b/.github/workflows/rocprofiler-sdk-code_coverage.yml @@ -55,7 +55,8 @@ env: mi3xx_EXCLUDE_LABEL_REGEX: "" navi4_EXCLUDE_LABEL_REGEX: "" GLOBAL_CMAKE_OPTIONS: "" - DISABLE_ROCR_BUILD: "false" + ENABLE_ROCR_BUILD: "true" + ENABLE_HIP_CLR_BUILD: "true" jobs: code-coverage: @@ -100,6 +101,8 @@ jobs: projects/aqlprofile projects/rocprofiler-register projects/rocr-runtime + projects/clr + projects/hip submodules: false set-safe-directory: true @@ -263,7 +266,7 @@ jobs: echo "✅ ROCProfiler-Register Installation complete!" - name: Build and Install ROCR-Runtime - if: ${{ !contains(env.DISABLE_ROCR_BUILD, 'true') }} + if: env.ENABLE_ROCR_BUILD shell: bash working-directory: projects/rocr-runtime run: | @@ -279,6 +282,33 @@ jobs: cmake --build build --target install echo "✅ ROCR-Runtime Installation complete!" + - name: Build and Install HIP + if: env.ENABLE_HIP_CLR_BUILD + shell: bash + working-directory: projects + run: | + export HIP_DIR=$PWD/hip + export CLR_DIR=$PWD/clr + export LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:$LD_LIBRARY_PATH + export PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH + echo "Install HIP..." + cd $CLR_DIR + cmake \ + -DHIP_COMMON_DIR=$HIP_DIR \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DHIP_PLATFORM=amd \ + -DCMAKE_PREFIX_PATH='${{ env.ROCM_PATH }}-${{ env.ROCM_VERSION }};${{ env.ROCM_PATH }}-${{ env.ROCM_VERSION }}/llvm' \ + -DCMAKE_INSTALL_PREFIX=${{ env.ROCM_PATH }}-${{ env.ROCM_VERSION }} \ + -DHIP_LLVM_ROOT=${{ env.ROCM_PATH }}/lib/llvm \ + -DHIP_CATCH_TEST=0 \ + -DCLR_BUILD_HIP=ON \ + -DCLR_BUILD_OCL=ON \ + -S $CLR_DIR \ + -B build + cmake --build build --target all --parallel 16 + cmake --build build --target install + echo "✅ HIP Installation complete!" + - name: Build and Install Aqlprofile shell: bash working-directory: projects/aqlprofile diff --git a/.github/workflows/rocprofiler-sdk-continuous_integration.yml b/.github/workflows/rocprofiler-sdk-continuous_integration.yml index 6f0b17b4c2..3d4ea442a8 100644 --- a/.github/workflows/rocprofiler-sdk-continuous_integration.yml +++ b/.github/workflows/rocprofiler-sdk-continuous_integration.yml @@ -62,7 +62,8 @@ env: navi4_EXCLUDE_LABEL_REGEX: "" GLOBAL_CMAKE_OPTIONS: "" - DISABLE_ROCR_BUILD: "false" + ENABLE_ROCR_BUILD: "true" + ENABLE_HIP_CLR_BUILD: "true" CI_MODE: ${{ github.event_name == 'schedule' && 'Nightly' || 'Continuous' }} @@ -227,7 +228,7 @@ jobs: echo "✅ ROCProfiler-Register Installation complete!" - name: Build and Install ROCR-Runtime - if: ${{ !contains(env.DISABLE_ROCR_BUILD, 'true') }} + if: env.ENABLE_ROCR_BUILD shell: bash working-directory: projects/rocr-runtime run: | @@ -244,7 +245,7 @@ jobs: echo "✅ ROCR-Runtime Installation complete!" - name: Build and Install HIP - if: ${{ !contains(env.DISABLE_HIP_BUILD, 'true') }} + if: env.ENABLE_HIP_CLR_BUILD shell: bash working-directory: projects run: | @@ -525,7 +526,7 @@ jobs: echo "✅ ROCProfiler-Register Installation complete!" - name: Build and Install ROCR-Runtime - if: ${{ !contains(env.DISABLE_ROCR_BUILD, 'true') }} + if: env.ENABLE_ROCR_BUILD shell: bash working-directory: projects/rocr-runtime run: | @@ -545,7 +546,7 @@ jobs: echo "✅ ROCR-Runtime Installation complete!" - name: Build and Install HIP - if: ${{ !contains(env.DISABLE_HIP_BUILD, 'true') }} + if: env.ENABLE_HIP_CLR_BUILD shell: bash working-directory: projects run: | @@ -768,7 +769,7 @@ jobs: echo "✅ ROCProfiler-Register Installation complete!" - name: Build and Install ROCR-Runtime - if: ${{ !contains(env.DISABLE_ROCR_BUILD, 'true') }} + if: env.ENABLE_ROCR_BUILD shell: bash working-directory: projects/rocr-runtime run: | @@ -785,7 +786,7 @@ jobs: echo "✅ ROCR-Runtime Installation complete!" - name: Build and Install HIP - if: ${{ !contains(env.DISABLE_HIP_BUILD, 'true') }} + if: env.ENABLE_HIP_CLR_BUILD shell: bash working-directory: projects run: |