26
26
required : false
27
27
type : string
28
28
default : OFF
29
+ docker_image :
30
+ required : true
31
+ type : string
32
+ default : " "
33
+ image_options :
34
+ required : true
35
+ type : string
36
+ default : " "
29
37
workflow_dispatch :
30
38
inputs :
31
39
adapter_name :
51
59
required : false
52
60
type : string
53
61
default : OFF
62
+ docker_image :
63
+ required : true
64
+ type : string
65
+ default : " "
66
+ image_options :
67
+ required : true
68
+ type : string
69
+ default : " "
54
70
55
- permissions :
56
- contents : read
71
+ permissions : read-all
57
72
58
73
env :
59
74
UR_LOG_CUDA : " level:error;flush:error"
60
75
UR_LOG_HIP : " level:error;flush:error"
61
76
UR_LOG_LEVEL_ZERO : " level:error;flush:error"
62
77
UR_LOG_NATIVE_CPU : " level:error;flush:error"
63
78
UR_LOG_OPENCL : " level:error;flush:error"
79
+ CURRENT_DIR : $(pwd)
64
80
65
81
jobs :
66
82
adapter_build_hw :
67
83
name : Build & CTS
68
84
# run only on upstream; forks won't have the HW
69
- if : github.repository == 'intel/llvm'
85
+ # if: github.repository == 'intel/llvm'
70
86
strategy :
71
87
fail-fast : false
72
88
matrix :
83
99
compiler : [{c: gcc, cxx: g++}]
84
100
85
101
runs-on : ${{inputs.runner_name}}
102
+ container :
103
+ image : ${{ inputs.docker_image }}
104
+ options : ${{ inputs.image_options }}
86
105
87
106
steps :
88
107
# TODO:
@@ -94,28 +113,42 @@ jobs:
94
113
- name : Checkout LLVM
95
114
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
96
115
97
- # Latest distros do not allow global pip installation
116
+ - name : Set up Python 3.10
117
+ if : ${{ inputs.docker_image == 'ghcr.io/intel/llvm/ubuntu2404_intel_drivers:alldeps' }}
118
+ uses : actions/setup-python@v5
119
+ with :
120
+ python-version : ' 3.10'
121
+
98
122
- name : Install UR python dependencies in venv
99
- working-directory : ${{github.workspace}} /unified-runtime
123
+ working-directory : . /unified-runtime
100
124
run : |
101
125
python3 -m venv .venv
102
126
. .venv/bin/activate
103
- echo "$PATH " >> $GITHUB_PATH
127
+ echo "${PWD}/.venv/bin " >> $GITHUB_PATH
104
128
pip install -r third_party/requirements.txt
105
129
pip install -r third_party/requirements_testing.txt
106
130
107
131
- name : Download DPC++
108
132
run : |
109
- wget -O ${{github.workspace}}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz
110
- mkdir dpcpp_compiler
111
- tar -xvf ${{github.workspace}}/dpcpp_compiler.tar.gz -C dpcpp_compiler
133
+ wget -O dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz
134
+ mkdir -p dpcpp_compiler
135
+ tar -xvf dpcpp_compiler.tar.gz -C dpcpp_compiler
136
+
137
+ - name : Install OpenCL
138
+ if : ${{ inputs.adapter_name == 'OPENCL' }}
139
+ run : |
140
+ wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
141
+ | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
142
+ echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
143
+ sudo apt-get update
144
+ sudo apt-get install -y intel-oneapi-runtime-opencl
112
145
113
146
- name : Configure Unified Runtime project
114
- working-directory : ${{github.workspace}}/unified-runtime
115
147
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
116
148
run : >
117
149
cmake
118
- -B${{github.workspace}}/build
150
+ -S unified-runtime
151
+ -B build
119
152
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
120
153
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
121
154
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
@@ -127,32 +160,34 @@ jobs:
127
160
${{ matrix.adapter.other_name != '' && format('-DUR_BUILD_ADAPTER_{0}=ON', matrix.adapter.other_name) || '' }}
128
161
-DUR_STATIC_LOADER=${{matrix.adapter.static_Loader}}
129
162
-DUR_STATIC_ADAPTER_${{matrix.adapter.name}}=${{matrix.adapter.static_adapter}}
130
- -DUR_DPCXX=${{github.workspace}} /dpcpp_compiler/bin/clang++
131
- -DUR_SYCL_LIBRARY_DIR=${{github.workspace}} /dpcpp_compiler/lib
132
- -DCMAKE_INSTALL_PREFIX=${{github.workspace}} /install
163
+ -DUR_DPCXX=. /dpcpp_compiler/bin/clang++
164
+ -DUR_SYCL_LIBRARY_DIR=. /dpcpp_compiler/lib
165
+ -DCMAKE_INSTALL_PREFIX=. /install
133
166
${{ matrix.adapter.name == 'HIP' && '-DUR_CONFORMANCE_AMD_ARCH=gfx1030' || '' }}
134
167
${{ matrix.adapter.name == 'HIP' && '-DUR_HIP_PLATFORM=AMD' || '' }}
135
168
136
169
- name : Build
137
170
# This is so that device binaries can find the sycl runtime library
138
- run : cmake --build ${{github.workspace}}/ build -j $(nproc)
171
+ run : cmake --build build -j $(nproc)
139
172
140
173
- name : Install
141
174
# This is to check that install command does not fail
142
- run : cmake --install ${{github.workspace}}/ build
175
+ run : cmake --install build
143
176
144
177
- name : Test adapter specific
145
178
env :
146
179
ZE_ENABLE_LOADER_DEBUG_TRACE : 1
147
- run : ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace}}/build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV
180
+ ZE_DEBUG : 1
181
+ run : ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600
148
182
# Don't run adapter specific tests when building multiple adapters
149
183
if : ${{ matrix.adapter.other_name == '' }}
150
184
151
185
- name : Test adapters
152
186
env :
153
187
ZE_ENABLE_LOADER_DEBUG_TRACE : 1
154
- run : env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace}}/build --output-on-failure -L "conformance" --timeout 600 -VV
188
+ ZE_DEBUG : 1
189
+ run : env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir build --output-on-failure -L "conformance" --timeout 600
155
190
156
191
- name : Get information about platform
157
192
if : ${{ always() }}
158
- run : ${{github.workspace}} /unified-runtime/.github/scripts/get_system_info.sh
193
+ run : . /unified-runtime/.github/scripts/get_system_info.sh
0 commit comments