Skip to content

Commit 44286d3

Browse files
committed
ci : add cublas to windows release
1 parent 6daa09d commit 44286d3

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/build.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,69 @@ jobs:
210210
path: |
211211
llama-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-x64.zip
212212
213+
windows-latest-cmake-cublas:
214+
runs-on: windows-latest
215+
216+
strategy:
217+
matrix:
218+
cuda: ['12.1.0']
219+
build: ['cublas']
220+
221+
steps:
222+
- name: Clone
223+
id: checkout
224+
uses: actions/checkout@v1
225+
226+
- uses: Jimver/[email protected]
227+
id: cuda-toolkit
228+
with:
229+
cuda: ${{ matrix.cuda }}
230+
# TODO(green-sky): _dev seems to fail, and non dev are not enought
231+
#sub-packages: '["nvcc", "cudart", "cublas", "cudart_dev", "cublas_dev"]'
232+
233+
- name: Build
234+
id: cmake_build
235+
run: |
236+
mkdir build
237+
cd build
238+
cmake .. -DLLAMA_CUBLAS=ON
239+
cmake --build . --config Release
240+
241+
- name: Get commit hash
242+
id: commit
243+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
244+
uses: pr-mpt/actions-commit-hash@v2
245+
246+
- name: Pack artifacts
247+
id: pack_artifacts
248+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
249+
run: |
250+
7z a llama-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip .\build\bin\Release\*
251+
252+
- name: Upload artifacts
253+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
254+
uses: actions/upload-artifact@v3
255+
with:
256+
path: |
257+
llama-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip
258+
259+
- name: Copy and pack Cuda runtime
260+
# TODO(green-sky): paths are cuda 12 specific
261+
run: |
262+
echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
263+
mkdir '.\build\bin\cudart\'
264+
cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cudart64_12.dll" '.\build\bin\cudart\'
265+
cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublas64_12.dll" '.\build\bin\cudart\'
266+
cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublasLt64_12.dll" '.\build\bin\cudart\'
267+
7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip .\build\bin\cudart\*
268+
269+
- name: Upload Cuda runtime
270+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
271+
uses: actions/upload-artifact@v3
272+
with:
273+
path: |
274+
cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip
275+
213276
release:
214277
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
215278

0 commit comments

Comments
 (0)