60
60
type : string
61
61
default : " "
62
62
63
- permissions :
64
- contents : read
63
+ permissions : read-all
65
64
66
65
env :
67
66
UR_LOG_CUDA : " level:error;flush:error"
68
67
UR_LOG_HIP : " level:error;flush:error"
69
68
UR_LOG_LEVEL_ZERO : " level:error;flush:error"
70
69
UR_LOG_NATIVE_CPU : " level:error;flush:error"
71
70
UR_LOG_OPENCL : " level:error;flush:error"
71
+ CURRENT_DIR : $(pwd)
72
72
73
73
jobs :
74
74
adapter_build_hw :
@@ -105,27 +105,32 @@ jobs:
105
105
- name : Checkout LLVM
106
106
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
107
107
108
+ - name : Set working directory as environment variable
109
+ run : echo "CURRENT_DIR=$(pwd)" >> $GITHUB_ENV
110
+
108
111
# Latest distros do not allow global pip installation
109
112
- name : Install UR python dependencies in venv
110
- working-directory : ${{github.workspace }}/unified-runtime
113
+ working-directory : ${{ env.CURRENT_DIR }}/unified-runtime
111
114
run : |
115
+ sudo apt update
116
+ sudo apt install -y python3-venv
112
117
python3 -m venv .venv
113
118
. .venv/bin/activate
114
- echo "$PATH " >> $GITHUB_PATH
119
+ echo "${PWD}/.venv/bin " >> $GITHUB_PATH
115
120
pip install -r third_party/requirements.txt
116
121
117
122
- name : Download DPC++
118
123
run : |
119
- wget -O ${{github.workspace }}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz
120
- mkdir dpcpp_compiler
121
- tar -xvf ${{github.workspace }}/dpcpp_compiler.tar.gz -C dpcpp_compiler
124
+ wget -O ${{ env.CURRENT_DIR }}/dpcpp_compiler.tar.gz https://github.com/intel/llvm/releases/download/nightly-2024-12-12/sycl_linux.tar.gz
125
+ mkdir -p ${{ env.CURRENT_DIR }}/ dpcpp_compiler
126
+ tar -xvf ${{ env.CURRENT_DIR }}/dpcpp_compiler.tar.gz -C dpcpp_compiler
122
127
123
128
- name : Configure Unified Runtime project
124
- working-directory : ${{github.workspace }}/unified-runtime
129
+ working-directory : ${{ env.CURRENT_DIR }}/unified-runtime
125
130
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
126
131
run : >
127
132
cmake
128
- -B${{github.workspace }}/build
133
+ -B${{ env.CURRENT_DIR }}/build
129
134
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
130
135
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
131
136
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
@@ -137,42 +142,56 @@ jobs:
137
142
${{ matrix.adapter.other_name != '' && format('-DUR_BUILD_ADAPTER_{0}=ON', matrix.adapter.other_name) || '' }}
138
143
-DUR_STATIC_LOADER=${{matrix.adapter.static_Loader}}
139
144
-DUR_STATIC_ADAPTER_${{matrix.adapter.name}}=${{matrix.adapter.static_adapter}}
140
- -DUR_DPCXX=${{github.workspace }}/dpcpp_compiler/bin/clang++
141
- -DUR_SYCL_LIBRARY_DIR=${{github.workspace }}/dpcpp_compiler/lib
142
- -DCMAKE_INSTALL_PREFIX=${{github.workspace }}/install
145
+ -DUR_DPCXX=${{ env.CURRENT_DIR }}/dpcpp_compiler/bin/clang++
146
+ -DUR_SYCL_LIBRARY_DIR=${{ env.CURRENT_DIR }}/dpcpp_compiler/lib
147
+ -DCMAKE_INSTALL_PREFIX=${{ env.CURRENT_DIR }}/install
143
148
${{ matrix.adapter.name == 'HIP' && '-DUR_CONFORMANCE_AMD_ARCH=gfx1030' || '' }}
144
149
${{ matrix.adapter.name == 'HIP' && '-DUR_HIP_PLATFORM=AMD' || '' }}
145
150
146
151
- name : Build
147
152
# This is so that device binaries can find the sycl runtime library
148
- run : cmake --build ${{github.workspace }}/build -j $(nproc)
153
+ run : cmake --build ${{ env.CURRENT_DIR }}/build -j $(nproc)
149
154
150
155
- name : Install
151
156
# This is to check that install command does not fail
152
- run : cmake --install ${{github.workspace }}/build
157
+ run : cmake --install ${{ env.CURRENT_DIR }}/build
153
158
154
- - name : Check if GPU is avaliable
159
+ - name : Install Intel Level Zero GPU
155
160
run : |
156
- ls -la /dev/dri/
157
- id
158
- dpkg -l | grep level-zero
159
- ldconfig -p | grep libze
160
- ls -la /dev/dri/
161
+ sudo apt-get update
162
+ sudo apt-get install -y gnupg2 gpg-agent curl
163
+ curl -fsSL https://repositories.intel.com/gpu/intel-graphics.key | sudo gpg --dearmor -o /usr/share/keyrings/intel-graphics.gpg
164
+ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy/lts/2350 unified" | sudo tee /etc/apt/sources.list.d/intel-gpu-jammy.list
165
+ sudo apt update
166
+ sudo apt install -y \
167
+ intel-opencl-icd intel-level-zero-gpu level-zero level-zero-dev \
168
+ intel-media-va-driver-non-free libmfx1 libmfxgen1 libvpl2 \
169
+ libegl-mesa0 libegl1-mesa libegl1-mesa-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri \
170
+ libglapi-mesa libgles2-mesa-dev libglx-mesa0 libigdgmm12 libxatracker2 mesa-va-drivers \
171
+ mesa-vdpau-drivers mesa-vulkan-drivers va-driver-all vainfo hwinfo clinfo
172
+
173
+ # - name: Check if GPU is avaliable
174
+ # run: |
175
+ # ls -la /dev/dri/
176
+ # id
177
+ # dpkg -l | grep level-zero
178
+ # ldconfig -p | grep libze
179
+ # ls -la /dev/dri/
161
180
162
181
- name : Test adapter specific
163
182
env :
164
183
ZE_ENABLE_LOADER_DEBUG_TRACE : 1
165
184
ZE_DEBUG : 1
166
- run : ctest -C ${{matrix.build_type}} --test-dir ${{github.workspace }}/build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV
185
+ run : ctest -C ${{matrix.build_type}} --test-dir ${{ env.CURRENT_DIR }}/build --output-on-failure -L "adapter-specific" -E "memcheck" --timeout 600 -VV
167
186
# Don't run adapter specific tests when building multiple adapters
168
187
if : ${{ matrix.adapter.other_name == '' }}
169
188
170
189
- name : Test adapters
171
190
env :
172
191
ZE_ENABLE_LOADER_DEBUG_TRACE : 1
173
192
ZE_DEBUG : 1
174
- 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
193
+ run : env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --test-dir ${{ env.CURRENT_DIR }}/build --output-on-failure -L "conformance" --timeout 600 -VV
175
194
176
195
- name : Get information about platform
177
196
# if: ${{ always() }}
178
- run : ${{github.workspace }}/unified-runtime/.github/scripts/get_system_info.sh
197
+ run : ${{ env.CURRENT_DIR }}/unified-runtime/.github/scripts/get_system_info.sh
0 commit comments