Skip to content

Commit 0c49a4e

Browse files
Merge pull request #1207 from lukaszstolarczuk/add-bmg
[CI] Enable L0 tests with BMG gpu card
2 parents 2991d6b + 9ab9d7b commit 0c49a4e

File tree

3 files changed

+49
-19
lines changed

3 files changed

+49
-19
lines changed

.github/workflows/nightly.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,19 @@ jobs:
299299
L0:
300300
uses: ./.github/workflows/reusable_gpu.yml
301301
with:
302-
name: "LEVEL_ZERO"
302+
provider: "LEVEL_ZERO"
303+
runner: "L0"
304+
L0-BMG:
305+
uses: ./.github/workflows/reusable_gpu.yml
306+
with:
307+
provider: "LEVEL_ZERO"
308+
runner: "L0-BMG"
309+
os: "['Ubuntu']"
303310
CUDA:
304311
uses: ./.github/workflows/reusable_gpu.yml
305312
with:
306-
name: "CUDA"
313+
provider: "CUDA"
314+
runner: "CUDA"
307315

308316
# Full execution of QEMU tests
309317
QEMU:

.github/workflows/pr_push.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,23 @@ jobs:
3838
needs: [Build]
3939
uses: ./.github/workflows/reusable_gpu.yml
4040
with:
41-
name: "LEVEL_ZERO"
41+
provider: "LEVEL_ZERO"
42+
runner: "L0"
4243
shared_lib: "['ON']"
44+
L0-BMG:
45+
needs: [Build]
46+
uses: ./.github/workflows/reusable_gpu.yml
47+
with:
48+
provider: "LEVEL_ZERO"
49+
runner: "L0-BMG"
50+
shared_lib: "['ON']"
51+
os: "['Ubuntu']"
4352
CUDA:
4453
needs: [Build]
4554
uses: ./.github/workflows/reusable_gpu.yml
4655
with:
47-
name: "CUDA"
56+
provider: "CUDA"
57+
runner: "CUDA"
4858
shared_lib: "['ON']"
4959
Sanitizers:
5060
needs: [FastBuild]

.github/workflows/reusable_gpu.yml

+27-15
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ name: GPU
55
on:
66
workflow_call:
77
inputs:
8-
name:
8+
provider:
99
description: Provider name
1010
type: string
1111
required: true
12+
runner:
13+
description: Runner name (without 'DSS-' prefix)
14+
type: string
15+
required: true
1216
os:
1317
description: A list of OSes
1418
type: string
@@ -36,7 +40,7 @@ jobs:
3640
env:
3741
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;"
3842
CUDA_PATH: "C:/cuda"
39-
COVERAGE_NAME : "exports-coverage-${{inputs.name}}"
43+
COVERAGE_NAME : "exports-coverage-${{inputs.provider}}-${{inputs.runner}}"
4044
# run only on upstream; forks will not have the HW
4145
if: github.repository == 'oneapi-src/unified-memory-framework'
4246
strategy:
@@ -45,16 +49,24 @@ jobs:
4549
shared_library: ${{ fromJSON(inputs.shared_lib)}}
4650
os: ${{ fromJSON(inputs.os)}}
4751
build_type: ${{ fromJSON(inputs.build_type)}}
48-
include:
49-
- os: 'Ubuntu'
50-
compiler: {c: gcc, cxx: g++}
51-
number_of_processors: '$(nproc)'
52-
- os: 'Windows'
53-
compiler: {c: cl, cxx: cl}
54-
number_of_processors: '$Env:NUMBER_OF_PROCESSORS'
55-
56-
runs-on: ["DSS-${{inputs.name}}", "DSS-${{matrix.os}}"]
52+
53+
runs-on: ["DSS-${{inputs.runner}}", "DSS-${{matrix.os}}"]
5754
steps:
55+
# Set number of processes and compiler based on OS
56+
- name: "[Win] Establish build params"
57+
if : ${{ matrix.os == 'Windows' }}
58+
run: |
59+
echo "C_COMPILER=cl" >> $GITHUB_ENV
60+
echo "CXX_COMPILER=cl" >> $GITHUB_ENV
61+
echo "PROCS=$Env:NUMBER_OF_PROCESSORS" >> $GITHUB_ENV
62+
63+
- name: "[Lin] Establish build params"
64+
if : ${{ matrix.os == 'Ubuntu' }}
65+
run: |
66+
echo "C_COMPILER=gcc" >> $GITHUB_ENV
67+
echo "CXX_COMPILER=g++" >> $GITHUB_ENV
68+
echo "PROCS=$(nproc)" >> $GITHUB_ENV
69+
5870
- name: Checkout
5971
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
6072
with:
@@ -85,8 +97,8 @@ jobs:
8597
-B ${{env.BUILD_DIR}}
8698
-DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}"
8799
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
88-
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
89-
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
100+
-DCMAKE_C_COMPILER=${{env.C_COMPILER}}
101+
-DCMAKE_CXX_COMPILER=${{env.CXX_COMPILER}}
90102
-DUMF_BUILD_SHARED_LIBRARY=${{matrix.shared_library}}
91103
-DUMF_BUILD_BENCHMARKS=ON
92104
-DUMF_BUILD_BENCHMARKS_MT=ON
@@ -97,13 +109,13 @@ jobs:
97109
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
98110
-DUMF_BUILD_CUDA_PROVIDER=OFF
99111
-DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF
100-
-DUMF_BUILD_${{inputs.name}}_PROVIDER=ON
112+
-DUMF_BUILD_${{inputs.provider}}_PROVIDER=ON
101113
-DUMF_TESTS_FAIL_ON_SKIP=ON
102114
${{ matrix.os == 'Ubuntu' && matrix.build_type == 'Debug' && '-DUMF_USE_COVERAGE=ON' || '' }}
103115
${{ matrix.os == 'Windows' && '-DCMAKE_SUPPRESS_REGENERATION=ON' || '' }}
104116
105117
- name: Build UMF
106-
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{matrix.number_of_processors}}
118+
run: cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j ${{env.PROCS}}
107119

108120
- name: Run tests
109121
working-directory: ${{env.BUILD_DIR}}

0 commit comments

Comments
 (0)