diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c664b7f87..c763fd77a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -299,11 +299,19 @@ jobs: L0: uses: ./.github/workflows/reusable_gpu.yml with: - name: "LEVEL_ZERO" + provider: "LEVEL_ZERO" + runner: "L0" + L0-BMG: + uses: ./.github/workflows/reusable_gpu.yml + with: + provider: "LEVEL_ZERO" + runner: "L0-BMG" + os: "['Ubuntu']" CUDA: uses: ./.github/workflows/reusable_gpu.yml with: - name: "CUDA" + provider: "CUDA" + runner: "CUDA" # Full execution of QEMU tests QEMU: diff --git a/.github/workflows/pr_push.yml b/.github/workflows/pr_push.yml index 511808887..202c72a9d 100644 --- a/.github/workflows/pr_push.yml +++ b/.github/workflows/pr_push.yml @@ -38,13 +38,23 @@ jobs: needs: [Build] uses: ./.github/workflows/reusable_gpu.yml with: - name: "LEVEL_ZERO" + provider: "LEVEL_ZERO" + runner: "L0" shared_lib: "['ON']" + L0-BMG: + needs: [Build] + uses: ./.github/workflows/reusable_gpu.yml + with: + provider: "LEVEL_ZERO" + runner: "L0-BMG" + shared_lib: "['ON']" + os: "['Ubuntu']" CUDA: needs: [Build] uses: ./.github/workflows/reusable_gpu.yml with: - name: "CUDA" + provider: "CUDA" + runner: "CUDA" shared_lib: "['ON']" Sanitizers: needs: [FastBuild] diff --git a/.github/workflows/reusable_gpu.yml b/.github/workflows/reusable_gpu.yml index 721d85206..cce99c64c 100644 --- a/.github/workflows/reusable_gpu.yml +++ b/.github/workflows/reusable_gpu.yml @@ -5,10 +5,14 @@ name: GPU on: workflow_call: inputs: - name: + provider: description: Provider name type: string required: true + runner: + description: Runner name (without 'DSS-' prefix) + type: string + required: true os: description: A list of OSes type: string @@ -36,7 +40,7 @@ jobs: env: VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows;" CUDA_PATH: "C:/cuda" - COVERAGE_NAME : "exports-coverage-${{inputs.name}}" + COVERAGE_NAME : "exports-coverage-${{inputs.provider}}-${{inputs.runner}}" # run only on upstream; forks will not have the HW if: github.repository == 'oneapi-src/unified-memory-framework' strategy: @@ -45,16 +49,24 @@ jobs: shared_library: ${{ fromJSON(inputs.shared_lib)}} os: ${{ fromJSON(inputs.os)}} build_type: ${{ fromJSON(inputs.build_type)}} - include: - - os: 'Ubuntu' - compiler: {c: gcc, cxx: g++} - number_of_processors: '$(nproc)' - - os: 'Windows' - compiler: {c: cl, cxx: cl} - number_of_processors: '$Env:NUMBER_OF_PROCESSORS' - - runs-on: ["DSS-${{inputs.name}}", "DSS-${{matrix.os}}"] + + runs-on: ["DSS-${{inputs.runner}}", "DSS-${{matrix.os}}"] steps: + # Set number of processes and compiler based on OS + - name: "[Win] Establish build params" + if : ${{ matrix.os == 'Windows' }} + run: | + echo "C_COMPILER=cl" >> $GITHUB_ENV + echo "CXX_COMPILER=cl" >> $GITHUB_ENV + echo "PROCS=$Env:NUMBER_OF_PROCESSORS" >> $GITHUB_ENV + + - name: "[Lin] Establish build params" + if : ${{ matrix.os == 'Ubuntu' }} + run: | + echo "C_COMPILER=gcc" >> $GITHUB_ENV + echo "CXX_COMPILER=g++" >> $GITHUB_ENV + echo "PROCS=$(nproc)" >> $GITHUB_ENV + - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: @@ -85,8 +97,8 @@ jobs: -B ${{env.BUILD_DIR}} -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" -DCMAKE_BUILD_TYPE=${{matrix.build_type}} - -DCMAKE_C_COMPILER=${{matrix.compiler.c}} - -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} + -DCMAKE_C_COMPILER=${{env.C_COMPILER}} + -DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}} -DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}} -DUMF_BUILD_BENCHMARKS=ON -DUMF_BUILD_BENCHMARKS_MT=ON @@ -97,13 +109,13 @@ jobs: -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON -DUMF_BUILD_CUDA_PROVIDER=OFF -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF - -DUMF_BUILD_${{inputs.name}}_PROVIDER=ON + -DUMF_BUILD_${{inputs.provider}}_PROVIDER=ON -DUMF_TESTS_FAIL_ON_SKIP=ON ${{ matrix.os == 'Ubuntu' && matrix.build_type == 'Debug' && '-DUMF_USE_COVERAGE=ON' || '' }} ${{ matrix.os == 'Windows' && '-DCMAKE_SUPPRESS_REGENERATION=ON' || '' }} - name: Build UMF - run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{matrix.number_of_processors}} + run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{env.PROCS}} - name: Run tests working-directory: ${{env.BUILD_DIR}}