@@ -106,12 +106,25 @@ jobs:
106106 - uses : actions/checkout@v6
107107 with : { fetch-depth: 0 }
108108
109- - name : Install Vulkan toolchain
109+ - name : Install Vulkan SDK prereqs
110110 run : |
111111 sudo apt-get update
112112 sudo apt-get install -y --no-install-recommends \
113- vulkan-headers libvulkan-dev glslc spirv-tools shaderc \
114- libglslang-dev
113+ build-essential curl tar xz-utils libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libssl-dev
114+
115+ # Pull the LunarG SDK rather than scraping apt packages that move
116+ # around between Ubuntu LTSes. Matches upstream `build-vulkan.yml`.
117+ - name : Install LunarG Vulkan SDK
118+ run : |
119+ set -e
120+ ver="$(curl -fsSL https://vulkan.lunarg.com/sdk/latest/linux.txt)"
121+ echo "Vulkan SDK version: $ver"
122+ curl -fsSL "https://sdk.lunarg.com/sdk/download/${ver}/linux/vulkan_sdk.tar.xz" -o /tmp/vulkan.tar.xz
123+ mkdir -p "$HOME/vulkan_sdk"
124+ tar -xJf /tmp/vulkan.tar.xz -C "$HOME/vulkan_sdk" --strip-components=1
125+ echo "VULKAN_SDK=$HOME/vulkan_sdk/x86_64" >> "$GITHUB_ENV"
126+ echo "$HOME/vulkan_sdk/x86_64/bin" >> "$GITHUB_PATH"
127+ echo "LD_LIBRARY_PATH=$HOME/vulkan_sdk/x86_64/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
115128
116129 - uses : ggml-org/ccache-action@v1.2.21
117130 with :
@@ -151,11 +164,24 @@ jobs:
151164
152165 - name : Install ROCm
153166 run : |
167+ # The GH jammy runner ships pre-existing rocm-* bits from the
168+ # Ubuntu archive (e.g. rocm-cmake 5.0) which conflict with
169+ # Radeon's own 6.x packages. Purge first, then pin Radeon's
170+ # repo with apt preferences so the full 6.x stack resolves
171+ # as a single coherent set.
154172 sudo apt-get update
155173 sudo apt-get install -y --no-install-recommends wget gnupg
156- wget -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
157- echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/6.0 jammy main' | \
158- sudo tee /etc/apt/sources.list.d/rocm.list
174+ sudo apt-get purge -y 'rocm-*' 'hip-*' 'miopen-*' 'hsa-*' 'hipblas*' 'rocblas*' 'rocfft*' || true
175+ sudo apt-get autoremove -y || true
176+
177+ sudo mkdir -p /etc/apt/keyrings
178+ wget -qO - https://repo.radeon.com/rocm/rocm.gpg.key \
179+ | sudo gpg --dearmor -o /etc/apt/keyrings/rocm.gpg
180+ echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.2.4 jammy main" \
181+ | sudo tee /etc/apt/sources.list.d/rocm.list
182+ printf 'Package: *\nPin: origin "repo.radeon.com"\nPin-Priority: 600\n' \
183+ | sudo tee /etc/apt/preferences.d/rocm-pin-600 >/dev/null
184+
159185 sudo apt-get update
160186 sudo apt-get install -y --no-install-recommends \
161187 rocm-dev rocm-libs hipblas-dev rocblas-dev
@@ -209,12 +235,25 @@ jobs:
209235 - uses : actions/checkout@v6
210236 with : { fetch-depth: 0 }
211237
212- - uses : Jimver/cuda-toolkit@v0.2.21
213- id : cuda-toolkit
214- with :
215- cuda : ' 12.6.0'
216- method : ' network'
217- sub-packages : ' ["nvcc", "cudart-dev", "cublas-dev", "cublas"]'
238+ # Install CUDA 12.6 from NVIDIA's own apt repo directly — the
239+ # Jimver action's sub-package name for cublas drifted between
240+ # CUDA 11 (cuda-cublas-*) and CUDA 12 (libcublas-*), and pinning
241+ # the real package names keeps us independent of that.
242+ - name : Install CUDA 12.6
243+ run : |
244+ set -e
245+ sudo apt-get update
246+ sudo apt-get install -y --no-install-recommends ca-certificates gnupg curl
247+ sudo mkdir -p /etc/apt/keyrings
248+ curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub \
249+ | sudo gpg --dearmor -o /etc/apt/keyrings/nvidia-cuda.gpg
250+ echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/nvidia-cuda.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /" \
251+ | sudo tee /etc/apt/sources.list.d/nvidia-cuda.list
252+ sudo apt-get update
253+ sudo apt-get install -y --no-install-recommends \
254+ cuda-nvcc-12-6 cuda-cudart-dev-12-6 libcublas-dev-12-6 libcublas-12-6
255+ echo "/usr/local/cuda-12.6/bin" >> $GITHUB_PATH
256+ echo "CUDA_PATH=/usr/local/cuda-12.6" >> $GITHUB_ENV
218257
219258 - uses : ggml-org/ccache-action@v1.2.21
220259 with :
0 commit comments