@@ -152,7 +152,9 @@ jobs:
152152 cmake_arch="${cmake_arch#sm_}"
153153 cmake -B build -S . \
154154 -DSD_CUBLAS=ON \
155+ -DGGML_CUDA=ON \
155156 -DCMAKE_CUDA_ARCHITECTURES="${cmake_arch}" \
157+ -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
156158 -DGGML_NATIVE=OFF \
157159 -DSD_BUILD_SHARED_LIBS=ON \
158160 -DCMAKE_BUILD_TYPE=Release
@@ -166,6 +168,9 @@ jobs:
166168 cp -av ${cuda_lib}/libcublasLt.so* build/bin/
167169 cp -av ${cuda_lib}/libcurand.so* build/bin/
168170 cp -av ${cuda_lib}/libnvJitLink.so* build/bin/
171+ # Copy all ggml shared libs (libggml.so, libggml-base.so, libggml-cuda.so, etc.)
172+ # from wherever cmake placed them outside build/bin/ into the distribution dir.
173+ find build -name 'libggml*.so*' ! -path 'build/bin/*' -exec cp -av {} build/bin/ \;
169174
170175 - name : Set RPATH for portable distribution
171176 run : |
@@ -275,6 +280,11 @@ jobs:
275280 if (-not $dll) { throw "Required CUDA runtime DLL matching '$pattern' was not found in $cudaBin" }
276281 Copy-Item $dll.FullName .\build\bin\Release
277282 }
283+ # Copy all ggml DLLs (ggml.dll, ggml-base.dll, ggml-cuda.dll, etc.)
284+ # from wherever cmake placed them outside build\bin\Release\ into the distribution dir.
285+ Get-ChildItem -Path build -Filter 'ggml*.dll' -Recurse |
286+ Where-Object { $_.FullName -notlike '*\bin\Release\*' } |
287+ ForEach-Object { Copy-Item $_.FullName .\build\bin\Release\ -Force }
278288 7z a sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-windows-cuda-${{ matrix.sm }}-x64.zip .\build\bin\Release\*
279289
280290 - name : Upload artifacts
0 commit comments