Skip to content

Commit e59d6e9

Browse files
committed
change permissions
1 parent 8e26d67 commit e59d6e9

File tree

1 file changed

+42
-23
lines changed

1 file changed

+42
-23
lines changed

.github/workflows/ur-build-hw.yml

+42-23
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,15 @@ on:
6060
type: string
6161
default: ""
6262

63-
permissions:
64-
contents: read
63+
permissions: read-all
6564

6665
env:
6766
UR_LOG_CUDA: "level:error;flush:error"
6867
UR_LOG_HIP: "level:error;flush:error"
6968
UR_LOG_LEVEL_ZERO: "level:error;flush:error"
7069
UR_LOG_NATIVE_CPU: "level:error;flush:error"
7170
UR_LOG_OPENCL: "level:error;flush:error"
71+
CURRENT_DIR: $(pwd)
7272

7373
jobs:
7474
adapter_build_hw:
@@ -105,27 +105,32 @@ jobs:
105105
- name: Checkout LLVM
106106
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
107107

108+
- name: Set working directory as environment variable
109+
run: echo "CURRENT_DIR=$(pwd)" >> $GITHUB_ENV
110+
108111
# Latest distros do not allow global pip installation
109112
- name: Install UR python dependencies in venv
110-
working-directory: ${{github.workspace}}/unified-runtime
113+
working-directory: ${{ env.CURRENT_DIR }}/unified-runtime
111114
run: |
115+
sudo apt update
116+
sudo apt install -y python3-venv
112117
python3 -m venv .venv
113118
. .venv/bin/activate
114-
echo "$PATH" >> $GITHUB_PATH
119+
echo "${PWD}/.venv/bin" >> $GITHUB_PATH
115120
pip install -r third_party/requirements.txt
116121
117122
- name: Download DPC++
118123
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
122127
123128
- name: Configure Unified Runtime project
124-
working-directory: ${{github.workspace}}/unified-runtime
129+
working-directory: ${{ env.CURRENT_DIR }}/unified-runtime
125130
# ">" is used to avoid adding "\" at the end of each line; this command is quite long
126131
run: >
127132
cmake
128-
-B${{github.workspace}}/build
133+
-B${{ env.CURRENT_DIR }}/build
129134
-DCMAKE_C_COMPILER=${{matrix.compiler.c}}
130135
-DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
131136
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
@@ -137,42 +142,56 @@ jobs:
137142
${{ matrix.adapter.other_name != '' && format('-DUR_BUILD_ADAPTER_{0}=ON', matrix.adapter.other_name) || '' }}
138143
-DUR_STATIC_LOADER=${{matrix.adapter.static_Loader}}
139144
-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
143148
${{ matrix.adapter.name == 'HIP' && '-DUR_CONFORMANCE_AMD_ARCH=gfx1030' || '' }}
144149
${{ matrix.adapter.name == 'HIP' && '-DUR_HIP_PLATFORM=AMD' || '' }}
145150
146151
- name: Build
147152
# 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)
149154

150155
- name: Install
151156
# 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
153158

154-
- name: Check if GPU is avaliable
159+
- name: Install Intel Level Zero GPU
155160
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/
161180

162181
- name: Test adapter specific
163182
env:
164183
ZE_ENABLE_LOADER_DEBUG_TRACE: 1
165184
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
167186
# Don't run adapter specific tests when building multiple adapters
168187
if: ${{ matrix.adapter.other_name == '' }}
169188

170189
- name: Test adapters
171190
env:
172191
ZE_ENABLE_LOADER_DEBUG_TRACE: 1
173192
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
175194

176195
- name: Get information about platform
177196
# 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

Comments
 (0)