Skip to content

Commit df4efd5

Browse files
Phqen1xclaude
andcommitted
ci: bundle libggml-cuda.so/ggml-cuda.dll in CUDA release artifacts
The ggml CUDA backend is built as a shared library plugin when SD_BUILD_SHARED_LIBS=ON. Bundle it alongside the CUDA runtime libs so that CUDA inference works out of the box without the plugin being missing at runtime. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c0335cf commit df4efd5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ jobs:
166166
cp -av ${cuda_lib}/libcublasLt.so* build/bin/
167167
cp -av ${cuda_lib}/libcurand.so* build/bin/
168168
cp -av ${cuda_lib}/libnvJitLink.so* build/bin/
169+
# ggml-cuda is a build artifact (backend plugin); copy it into bin/ if
170+
# cmake placed it outside build/bin/ (e.g. build/ggml/src/)
171+
find build -name 'libggml-cuda.so*' ! -path 'build/bin/*' -exec cp -av {} build/bin/ \;
169172
170173
- name: Set RPATH for portable distribution
171174
run: |
@@ -275,6 +278,12 @@ jobs:
275278
if (-not $dll) { throw "Required CUDA runtime DLL matching '$pattern' was not found in $cudaBin" }
276279
Copy-Item $dll.FullName .\build\bin\Release
277280
}
281+
# ggml-cuda.dll is a build artifact (backend plugin); copy into Release/
282+
# if cmake placed it outside build\bin\Release\ (e.g. build\ggml\src\Release\)
283+
$ggmlCuda = Get-ChildItem -Path build -Filter 'ggml-cuda.dll' -Recurse |
284+
Where-Object { $_.FullName -notlike '*\bin\Release\*' } |
285+
Select-Object -First 1
286+
if ($ggmlCuda) { Copy-Item $ggmlCuda.FullName .\build\bin\Release\ }
278287
7z a sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-windows-cuda-${{ matrix.sm }}-x64.zip .\build\bin\Release\*
279288
280289
- name: Upload artifacts

0 commit comments

Comments
 (0)