File tree Expand file tree Collapse file tree
actions/setup-vulkan/linux Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -260,6 +260,10 @@ jobs:
260260 sudo -E bash devops/scripts/install_drivers.sh devops/dependencies.json --all
261261 - name : Source OneAPI TBB vars.sh
262262 uses : ./devops/actions/source-tbb
263+ - name : Setup Vulkan environment
264+ # Don't use Vulkan for PVC because it requires an out-of-tree userspace driver
265+ if : !contains(${{ fromJSON(inputs.runner) }}, 'pvc')
266+ uses : ./devops/actions/setup-vulkan/linux
263267 - name : Download SYCL toolchain
264268 if : inputs.toolchain_artifact != '' && github.event_name != 'workflow_run'
265269 uses : actions/download-artifact@v7
Original file line number Diff line number Diff line change 1+ name : " Setup Vulkan environment"
2+ description : " Sources the Vulkan environment script and updates GITHUB_ENV."
3+ runs :
4+ using : " composite"
5+ steps :
6+ - shell : bash
7+ run : |
8+ # https://github.com/actions/runner/issues/1964 prevents us from using
9+ # the ENTRYPOINT in the image.
10+ env | sort > env_before
11+ if [ -e /opt/vulkan/setup-env.sh ]; then
12+ source /opt/vulkan/setup-env.sh;
13+ else
14+ echo "Could not find Vulkan environment setup script"
15+ fi
16+ env | sort > env_after
17+ comm -13 env_before env_after >> $GITHUB_ENV
18+ rm env_before env_after
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ USER root
88COPY scripts/install_build_tools.sh /install.sh
99RUN /install.sh
1010
11+ COPY scripts/install_vulkan.sh /install_vulkan.sh
12+ RUN /install_vulkan.sh
13+
1114COPY scripts/create-sycl-user.sh /user-setup.sh
1215RUN /user-setup.sh
1316
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/
1212COPY scripts/install_build_tools.sh /install.sh
1313RUN /install.sh
1414
15+ COPY scripts/install_vulkan.sh /install_vulkan.sh
16+ RUN /install_vulkan.sh
17+
1518# Install ROCM
1619
1720# Make the directory if it doesn't exist yet.
Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ RUN echo 'deb http://apt.llvm.org/noble/ llvm-toolchain-noble main' > /etc/apt/s
1313COPY scripts/install_build_tools.sh /install.sh
1414RUN /install.sh
1515
16+ COPY scripts/install_vulkan.sh /install_vulkan.sh
17+ RUN /install_vulkan.sh
18+
1619# libzstd-dev installed by default on Ubuntu 24.04 is not compiled with -fPIC flag.
1720# This causes linking errors when building SYCL runtime.
1821# Bug: https://github.com/intel/llvm/issues/15935
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ USER root
88COPY scripts/install_build_tools.sh /install.sh
99RUN /install.sh
1010
11+ COPY scripts/install_vulkan.sh /install_vulkan.sh
12+ RUN /install_vulkan.sh
13+
1114# libzstd-dev installed by default on Ubuntu 24.04 is not compiled with -fPIC flag.
1215# This causes linking errors when building SYCL runtime.
1316# Bug: https://github.com/intel/llvm/issues/15935
Original file line number Diff line number Diff line change @@ -36,9 +36,7 @@ apt update && apt install -yqq \
3636# https://github.com/KhronosGroup/SPIRV-LLVM-Translator/blob/cec12d6cf46306d0a015e883d5adb5a8200df1c0/.github/workflows/check-out-of-tree-build.yml#L59
3737# pkg-config is required for llvm-spriv to detect spriv-tools installation.
3838. /etc/os-release
39- curl -L " https://packages.lunarg.com/lunarg-signing-key-pub.asc" | apt-key add -
40- echo " deb https://packages.lunarg.com/vulkan $VERSION_CODENAME main" | tee -a /etc/apt/sources.list
41- apt update && apt install -yqq spirv-tools pkg-config
39+ apt update && apt install -yqq pkg-config
4240
4341if [[ " $VERSION_CODENAME " == " jammy" ]]; then
4442 apt-get install -yqq clang-14 libc++-14-dev
Original file line number Diff line number Diff line change 1+ set -x
2+ VULKAN_VER=" 1.4.335.0"
3+ wget https://sdk.lunarg.com/sdk/download/$VULKAN_VER /linux/vulkansdk-linux-x86_64-$VULKAN_VER .tar.xz -O vulkan.tar.xz
4+ tar xf vulkan.tar.xz
5+ mv $VULKAN_VER vulkan
6+ cd vulkan
7+ sudo bash -c ' echo -e "APT::Get::Assume-Yes \"true\";\nAPT::Get::force-yes \"true\";" > /etc/apt/apt.conf.d/90forceyes'
8+ sudo DEBIAN_FRONTEND=noninteractive ./vulkansdk --maxjobs
9+ cd ..
10+ rm vulkan.tar.xz
11+ sudo rm /etc/apt/apt.conf.d/90forceyes
12+ sudo mv vulkan /opt/
You can’t perform that action at this time.
0 commit comments