Skip to content

Commit

Permalink
add cublas
Browse files Browse the repository at this point in the history
  • Loading branch information
okdshin committed Nov 26, 2023
1 parent 287b9f3 commit 1a7fa65
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ on:
- main

jobs:
release-ubuntu-1804-openblas:
release-ubuntu-1804:
runs-on: ubuntu-18.04

strategy:
matrix:
include:
- build: 'openblas'
defines: '-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS'
- build: 'cublas'
defines: '-DLLAMA_CUBLAS=ON'

steps:
- name: Clone
id: checkout
Expand All @@ -24,18 +32,30 @@ jobs:
id: depends
run: |
sudo apt-get update
sudo apt-get install -y build-essential gcc-8 g++-8 python3.8 libpython3.8-dev libopenblas-dev python3-pip
sudo apt-get install -y build-essential gcc-8 g++-8 python3.8 libpython3.8-dev python3-pip
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
python3.8 -m pip install -U pip
python3.8 -m pip install cmake
python3.8 -m pip install torch --index-url https://download.pytorch.org/whl/cpu
python3.8 -m pip install transformers tiktoken pyinstaller
- name: Dependencies
id: depends_openblas
if: ${{ matrix.build == 'openblas' }}
run: |
sudo apt-get install -y libopenblas-dev
- uses: Jimver/[email protected]
id: cuda-toolkit
if: ${{ matrix.build == 'cublas' }}
with:
cuda: '11.8.0'

- name: Build backend server
id: cmake_build_backend_server
run: |
cmake -B build_backend_server -S . -DLLAMA_NATIVE=OFF -DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS
cmake -B build_backend_server -S . -DLLAMA_NATIVE=OFF ${{ matrix.defines }}
cmake --build build_backend_server --config Release
- name: Build lsp server
Expand All @@ -60,7 +80,7 @@ jobs:
mkdir -p ./dist/flatline_lsp/license
find build_backend_server/bin -name \*.LICENSE.txt | xargs -I{} cp {} ./dist/flatline_lsp/license/
cd dist
zip -r flatline_lsp.zip flatline_lsp
zip -r flatline_lsp_${{ matrix.build }}.zip flatline_lsp
- name: Create release
id: create_release
Expand All @@ -82,7 +102,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/flatline_lsp.zip
asset_name: flatline_lsp.zip
asset_path: ./dist/flatline_lsp_${{ matrix.build }}.zip
asset_name: flatline_lsp_${{ matrix.build }}.zip
asset_content_type: application/zip

0 comments on commit 1a7fa65

Please sign in to comment.