@@ -288,17 +288,6 @@ jobs:
288288 permissions :
289289 contents : write
290290
291- env :
292- OPENBLAS_VERSION : 0.3.23
293- OPENCL_VERSION : 2023.04.17
294- CLBLAST_VERSION : 1.6.0
295-
296- strategy :
297- matrix :
298- include :
299- - build : ' normal'
300- defines : ' -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
301-
302291 steps :
303292 - name : Clone
304293
@@ -315,7 +304,6 @@ jobs:
315304 env :
316305 ACTIONS_ALLOW_UNSECURE_COMMANDS : true
317306
318-
319307 - name : actions-setup-cmake
320308 uses : jwlawson/actions-setup-cmake@v1.14.1
321309
@@ -327,15 +315,15 @@ jobs:
327315 cmake --build ./build_deps/nitro_deps --config Release
328316 mkdir -p build
329317 cd build
330- cmake ..
318+ cmake .. -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_BLAS=ON -DBUILD_SHARED_LIBS=ON
331319 cmake --build . --config Release -j "%NUMBER_OF_PROCESSORS%"
332320
333321 - name : Pack artifacts
334322 id : pack_artifacts
335323 shell : cmd
336324 run : |
337- robocopy build_deps\_install\bin .\build\Release zlib.dll
338- robocopy build\bin\Release .\build\Release llama.dll
325+ robocopy build_deps\_install\bin\ .\build\Release\ zlib.dll
326+ robocopy build\bin\Release\ .\build\Release\ llama.dll
339327 dotnet tool install --global AzureSignTool
340328 azuresigntool.exe sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\build\Release\nitro.exe"
341329 7z a -ttar temp.tar .\build\Release\*
@@ -371,11 +359,6 @@ jobs:
371359 permissions :
372360 contents : write
373361
374- strategy :
375- matrix :
376- cuda : ['12.2.0']
377- build : ['cublas']
378-
379362 steps :
380363 - name : Clone
381364 id : checkout
@@ -390,7 +373,7 @@ jobs:
390373 silent : true
391374 env :
392375 ACTIONS_ALLOW_UNSECURE_COMMANDS : true
393-
376+
394377 - uses : actions/setup-dotnet@v3
395378 with :
396379 dotnet-version : ' 6.0.x'
@@ -403,16 +386,16 @@ jobs:
403386 cmake --build ./build_deps/nitro_deps --config Release
404387 mkdir -p build
405388 cd build
406- cmake .. -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUBLAS=ON
389+ cmake .. -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_CUBLAS=ON -DBUILD_SHARED_LIBS=ON
407390 cmake --build . --config Release -j "%NUMBER_OF_PROCESSORS%"
408391
409392 - name : Pack artifacts
410393 id : pack_artifacts
411394 shell : cmd
412395 run : |
413396 set PATH=%PATH%;C:\Program Files\7-Zip\
414- robocopy build_deps\_install\bin .\build\Release zlib.dll
415- robocopy build\bin\Release .\build\Release llama.dll
397+ robocopy build_deps\_install\bin\ .\build\Release\ zlib.dll
398+ robocopy build\bin\Release\ .\build\Release\ llama.dll
416399 dotnet tool install --global AzureSignTool
417400 %USERPROFILE%\.dotnet\tools\azuresigntool.exe sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\build\Release\nitro.exe"
418401 7z a -ttar temp.tar .\build\Release\*
@@ -439,11 +422,52 @@ jobs:
439422 upload_url : ${{ needs.create-draft-release.outputs.upload_url }}
440423 asset_path : ./nitro.tar.gz
441424 asset_name : nitro-${{ needs.create-draft-release.outputs.version }}-win-amd64-cuda.tar.gz
442- asset_content_type : application/gzip
425+ asset_content_type : application/gzip
426+
427+ windows-amd64-cuda-package :
428+ runs-on : windows-latest
429+ needs : create-draft-release
430+ if : always() && (needs.create-draft-release.result == 'success' || needs.create-draft-release.result == 'skipped')
431+ permissions :
432+ contents : write
433+
434+ strategy :
435+ matrix :
436+ cuda : ['12.2.0', '11.7.1']
437+ build : ['cublas']
438+
439+ steps :
440+ - uses : Jimver/cuda-toolkit@v0.2.11
441+ id : cuda-toolkit
442+ with :
443+ cuda : ${{ matrix.cuda }}
444+ method : ' network'
445+ sub-packages : ' ["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
446+
447+ - name : Copy and Pack CUDA runtime
448+ id : pack_artifacts
449+ shell : cmd
450+ run : |
451+ echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
452+ mkdir -p build
453+ $dst='.\build\'
454+ robocopy "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
455+ 7z a -ttar temp.tar $dst\*
456+ 7z a -tgzip cudart.tar.gz temp.tar
457+
458+ - uses : actions/upload-release-asset@v1.0.1
459+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
460+ env :
461+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
462+ with :
463+ upload_url : ${{ needs.create-draft-release.outputs.upload_url }}
464+ asset_path : ./cudart.tar.gz
465+ asset_name : cudart-bin-win-cu${{ matrix.cuda }}-x64.tar.gz
466+ asset_content_type : application/gzip
443467
444468 update_release_draft :
445469 if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
446- needs : [ubuntu-amd64-build, ubuntu-amd64-cuda-build, macOS-M-build, macOS-Intel-build, windows-amd64-build, windows-amd64-cuda-build]
470+ needs : [ubuntu-amd64-build, ubuntu-amd64-cuda-build, macOS-M-build, macOS-Intel-build, windows-amd64-build, windows-amd64-cuda-build, windows-amd64-cuda-package ]
447471 permissions :
448472 contents : write
449473 pull-requests : write
0 commit comments