forked from ggerganov/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ggerganov:master' into betterlogs2
- Loading branch information
Showing
69 changed files
with
3,346 additions
and
957 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
node('x86_runner1'){ // Running on x86 runner containing latest vector qemu, latest vector gcc and all the necessary libraries | ||
stage('Cleanup'){ | ||
cleanWs() // Cleaning previous CI build in workspace | ||
} | ||
stage('checkout repo'){ | ||
retry(5){ // Retry if the cloning fails due to some reason | ||
checkout scm // Clone the repo on Runner | ||
} | ||
} | ||
stage('Compiling llama.cpp'){ | ||
sh'''#!/bin/bash | ||
make RISCV=1 RISCV_CROSS_COMPILE=1 # Compiling llama for RISC-V | ||
''' | ||
} | ||
stage('Running llama.cpp'){ | ||
sh'''#!/bin/bash | ||
module load gnu-bin2/0.1 # loading latest versions of vector qemu and vector gcc | ||
qemu-riscv64 -L /softwares/gnu-bin2/sysroot -cpu rv64,v=true,vlen=256,elen=64,vext_spec=v1.0 ./main -m /home/alitariq/codellama-7b.Q4_K_M.gguf -p "Anything" -n 9 > llama_log.txt # Running llama.cpp on vector qemu-riscv64 | ||
cat llama_log.txt # Printing results | ||
''' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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,9 @@ jobs: | |
steps: | ||
- name: Clone | ||
id: checkout | ||
uses: actions/checkout@v1 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download OpenCL SDK | ||
id: get_opencl | ||
|
@@ -390,20 +392,21 @@ 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 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: Jimver/[email protected].10 | ||
- uses: Jimver/[email protected].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 +443,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 +456,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/[email protected] | ||
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 +488,9 @@ jobs: | |
steps: | ||
- name: Clone | ||
id: checkout | ||
uses: actions/checkout@v1 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Determine tag name | ||
id: tag | ||
|
@@ -543,7 +548,7 @@ jobs: | |
# | ||
# steps: | ||
# - name: Clone | ||
# uses: actions/checkout@v1 | ||
# uses: actions/checkout@v3 | ||
# | ||
# - name: Dependencies | ||
# run: | | ||
|
@@ -567,7 +572,7 @@ jobs: | |
# | ||
# steps: | ||
# - name: Clone | ||
# uses: actions/checkout@v1 | ||
# uses: actions/checkout@v3 | ||
# | ||
# - name: Dependencies | ||
# run: | | ||
|
@@ -591,7 +596,7 @@ jobs: | |
# | ||
# steps: | ||
# - name: Clone | ||
# uses: actions/checkout@v1 | ||
# uses: actions/checkout@v3 | ||
# | ||
# - name: Dependencies | ||
# run: | | ||
|
@@ -621,7 +626,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 +665,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 +711,7 @@ jobs: | |
# | ||
# steps: | ||
# - name: Clone | ||
# uses: actions/checkout@v1 | ||
# uses: actions/checkout@v3 | ||
# | ||
# - name: Dependencies | ||
# run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.