Skip to content

Commit c2cc188

Browse files
authored
Merge pull request #10 from Phqen1x/bundle-ggml-cuda
ci: bundle libggml-cuda.so/ggml-cuda.dll in CUDA release artifacts
2 parents e3937d9 + df4efd5 commit c2cc188

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
@@ -167,6 +167,9 @@ jobs:
167167
cp -av ${cuda_lib}/libcublasLt.so* build/bin/
168168
cp -av ${cuda_lib}/libcurand.so* build/bin/
169169
cp -av ${cuda_lib}/libnvJitLink.so* build/bin/
170+
# ggml-cuda is a build artifact (backend plugin); copy it into bin/ if
171+
# cmake placed it outside build/bin/ (e.g. build/ggml/src/)
172+
find build -name 'libggml-cuda.so*' ! -path 'build/bin/*' -exec cp -av {} build/bin/ \;
170173
171174
- name: Set RPATH for portable distribution
172175
run: |
@@ -271,6 +274,12 @@ jobs:
271274
if (-not $dll) { throw "Required CUDA runtime DLL matching '$pattern' was not found in $cudaBin" }
272275
Copy-Item $dll.FullName .\build\bin\Release
273276
}
277+
# ggml-cuda.dll is a build artifact (backend plugin); copy into Release/
278+
# if cmake placed it outside build\bin\Release\ (e.g. build\ggml\src\Release\)
279+
$ggmlCuda = Get-ChildItem -Path build -Filter 'ggml-cuda.dll' -Recurse |
280+
Where-Object { $_.FullName -notlike '*\bin\Release\*' } |
281+
Select-Object -First 1
282+
if ($ggmlCuda) { Copy-Item $ggmlCuda.FullName .\build\bin\Release\ }
274283
7z a sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-windows-cuda-${{ matrix.sm }}-x64.zip .\build\bin\Release\*
275284
276285
- name: Upload artifacts

0 commit comments

Comments
 (0)