summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon <alonfaraj@gmail.com>2023-09-14 20:21:25 +0300
committerGitHub <noreply@github.com>2023-09-14 19:21:25 +0200
commit83a53b753a9499a2a3535c93975b430cb2c828a9 (patch)
tree61f4dff3dff3bfbee0ac675c1d160966fea853e2
parent5c872dbca2c7979b1f6dafc97db0774b8bbf9372 (diff)
CI: add FreeBSD & simplify CUDA windows (#3053)
* add freebsd to ci * bump actions/checkout to v3 * bump cuda 12.1.0 -> 12.2.0 * bump Jimver/cuda-toolkit version * unify and simplify "Copy and pack Cuda runtime" * install only necessary cuda sub packages
-rw-r--r--.github/workflows/build.yml75
-rw-r--r--.github/workflows/gguf-publish.yml2
2 files changed, 38 insertions, 39 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 95538bd8..641dbccd 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -27,7 +27,7 @@ jobs:
steps:
- name: Clone
id: checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Dependencies
id: depends
@@ -52,7 +52,7 @@ jobs:
steps:
- name: Clone
id: checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Dependencies
id: depends
@@ -87,7 +87,7 @@ jobs:
steps:
- name: Clone
id: checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Dependencies
id: depends
@@ -121,7 +121,7 @@ jobs:
steps:
- name: Clone
id: checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Dependencies
id: depends
@@ -149,7 +149,7 @@ jobs:
steps:
- name: Clone
id: checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Dependencies
id: depends
@@ -174,7 +174,7 @@ jobs:
steps:
- name: Clone
id: checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Dependencies
id: depends
@@ -280,7 +280,7 @@ jobs:
steps:
- name: Clone
id: checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Download OpenCL SDK
id: get_opencl
@@ -390,20 +390,19 @@ jobs:
strategy:
matrix:
- cuda: ['12.1.0', '11.7.1']
+ cuda: ['12.2.0', '11.7.1']
build: ['cublas']
steps:
- name: Clone
id: checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- - uses: Jimver/cuda-toolkit@v0.2.10
+ - uses: Jimver/cuda-toolkit@v0.2.11
id: cuda-toolkit
with:
cuda: ${{ matrix.cuda }}
- # TODO(green-sky): _dev seems to fail, and non dev are not enought
- #sub-packages: '["nvcc", "cudart", "cublas", "cudart_dev", "cublas_dev"]'
+ sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
- name: Build
id: cmake_build
@@ -440,27 +439,11 @@ jobs:
llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip
- name: Copy and pack Cuda runtime
- if: ${{ matrix.cuda == '12.1.0' }}
- # TODO(green-sky): paths are cuda 12 specific
run: |
echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
- mkdir '.\build\bin\cudart\'
- cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cudart64_12.dll" '.\build\bin\cudart\'
- cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublas64_12.dll" '.\build\bin\cudart\'
- cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublasLt64_12.dll" '.\build\bin\cudart\'
- 7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip .\build\bin\cudart\*
-
- - name: Copy and pack Cuda runtime
- if: ${{ matrix.cuda == '11.7.1' }}
- # TODO(green-sky): paths are cuda 11 specific
- run: |
- echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
- mkdir '.\build\bin\cudart\'
- ls "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin"
- cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cudart64_110.dll" '.\build\bin\cudart\'
- cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublas64_11.dll" '.\build\bin\cudart\'
- cp "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin\cublasLt64_11.dll" '.\build\bin\cudart\'
- 7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip .\build\bin\cudart\*
+ $dst='.\build\bin\cudart\'
+ robocopy "${{steps.cuda-toolkit.outputs.CUDA_PATH}}\bin" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
+ 7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip $dst\*
- name: Upload Cuda runtime
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
@@ -469,6 +452,22 @@ jobs:
path: |
cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip
+ freeBSD-latest:
+ runs-on: macos-12
+ steps:
+ - name: Clone
+ uses: actions/checkout@v3
+
+ - name: Build
+ uses: cross-platform-actions/action@v0.19.0
+ with:
+ operating_system: freebsd
+ version: '13.2'
+ run: |
+ sudo pkg update
+ sudo pkg install -y gmake automake autoconf pkgconf llvm15 clinfo clover opencl clblast openblas
+ gmake CC=/usr/local/bin/clang15 CXX=/usr/local/bin/clang++15
+
release:
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
@@ -485,7 +484,7 @@ jobs:
steps:
- name: Clone
id: checkout
- uses: actions/checkout@v1
+ uses: actions/checkout@v3
- name: Determine tag name
id: tag
@@ -543,7 +542,7 @@ jobs:
#
# steps:
# - name: Clone
-# uses: actions/checkout@v1
+# uses: actions/checkout@v3
#
# - name: Dependencies
# run: |
@@ -567,7 +566,7 @@ jobs:
#
# steps:
# - name: Clone
-# uses: actions/checkout@v1
+# uses: actions/checkout@v3
#
# - name: Dependencies
# run: |
@@ -591,7 +590,7 @@ jobs:
#
# steps:
# - name: Clone
-# uses: actions/checkout@v1
+# uses: actions/checkout@v3
#
# - name: Dependencies
# run: |
@@ -621,7 +620,7 @@ jobs:
#
# steps:
# - name: Clone
-# uses: actions/checkout@v1
+# uses: actions/checkout@v3
#
# - name: Add msbuild to PATH
# uses: microsoft/setup-msbuild@v1
@@ -660,7 +659,7 @@ jobs:
#
# steps:
# - name: Clone
-# uses: actions/checkout@v1
+# uses: actions/checkout@v3
#
# - name: Add msbuild to PATH
# uses: microsoft/setup-msbuild@v1
@@ -706,7 +705,7 @@ jobs:
#
# steps:
# - name: Clone
-# uses: actions/checkout@v1
+# uses: actions/checkout@v3
#
# - name: Dependencies
# run: |
diff --git a/.github/workflows/gguf-publish.yml b/.github/workflows/gguf-publish.yml
index a6289e33..e61bfc6c 100644
--- a/.github/workflows/gguf-publish.yml
+++ b/.github/workflows/gguf-publish.yml
@@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with: