Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ jobs:
cmake_arch="${cmake_arch#sm_}"
cmake -B build -S . \
-DSD_CUBLAS=ON \
-DGGML_CUDA=ON \
-DCMAKE_CUDA_ARCHITECTURES="${cmake_arch}" \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DGGML_NATIVE=OFF \
-DSD_BUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release
Expand All @@ -166,9 +168,9 @@ jobs:
cp -av ${cuda_lib}/libcublasLt.so* build/bin/
cp -av ${cuda_lib}/libcurand.so* build/bin/
cp -av ${cuda_lib}/libnvJitLink.so* build/bin/
# ggml-cuda is a build artifact (backend plugin); copy it into bin/ if
# cmake placed it outside build/bin/ (e.g. build/ggml/src/)
find build -name 'libggml-cuda.so*' ! -path 'build/bin/*' -exec cp -av {} build/bin/ \;
# Copy all ggml shared libs (libggml.so, libggml-base.so, libggml-cuda.so, etc.)
# from wherever cmake placed them outside build/bin/ into the distribution dir.
find build -name 'libggml*.so*' ! -path 'build/bin/*' -exec cp -av {} build/bin/ \;

- name: Set RPATH for portable distribution
run: |
Expand Down Expand Up @@ -278,12 +280,11 @@ jobs:
if (-not $dll) { throw "Required CUDA runtime DLL matching '$pattern' was not found in $cudaBin" }
Copy-Item $dll.FullName .\build\bin\Release
}
# ggml-cuda.dll is a build artifact (backend plugin); copy into Release/
# if cmake placed it outside build\bin\Release\ (e.g. build\ggml\src\Release\)
$ggmlCuda = Get-ChildItem -Path build -Filter 'ggml-cuda.dll' -Recurse |
# Copy all ggml DLLs (ggml.dll, ggml-base.dll, ggml-cuda.dll, etc.)
# from wherever cmake placed them outside build\bin\Release\ into the distribution dir.
Get-ChildItem -Path build -Filter 'ggml*.dll' -Recurse |
Where-Object { $_.FullName -notlike '*\bin\Release\*' } |
Select-Object -First 1
if ($ggmlCuda) { Copy-Item $ggmlCuda.FullName .\build\bin\Release\ }
ForEach-Object { Copy-Item $_.FullName .\build\bin\Release\ -Force }
7z a sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-windows-cuda-${{ matrix.sm }}-x64.zip .\build\bin\Release\*

- name: Upload artifacts
Expand Down
Loading