From fbdb0f48700d4137ee3d69820c339548491bf00f Mon Sep 17 00:00:00 2001 From: okada Date: Tue, 12 Mar 2024 00:09:12 +0900 Subject: [PATCH 1/4] support cuda 12 --- .github/workflows/build.yaml | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f3b1a1c..3a9072c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,7 +22,9 @@ jobs: include: - build: 'openblas' defines: '-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS' - - build: 'cublas' + - build: 'cublas11' + defines: '-DLLAMA_CUBLAS=ON' + - build: 'cublas12' defines: '-DLLAMA_CUBLAS=ON' steps: @@ -47,10 +49,16 @@ jobs: - uses: Jimver/cuda-toolkit@v0.2.10 id: cuda-toolkit - if: ${{ matrix.build == 'cublas' }} + if: ${{ matrix.build == 'cublas11' }} with: cuda: '11.8.0' + - uses: Jimver/cuda-toolkit@v0.2.10 + id: cuda-toolkit + if: ${{ matrix.build == 'cublas12' }} + with: + cuda: '12.2.0' + - name: Build backend server id: cmake_build_backend_server run: | @@ -132,15 +140,26 @@ jobs: asset_name: flatline_lsp_ubuntu2004_openblas.zip asset_content_type: application/zip - - name: Upload release cublas asset - id: upload_release_cublas_asset + - name: Upload release cublas11 asset + id: upload_release_cublas11_asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: flatline_lsp_ubuntu2004_cublas11.zip/flatline_lsp_ubuntu2004_cublas11.zip + asset_name: flatline_lsp_ubuntu2004_cublas11.zip + asset_content_type: application/zip + + - name: Upload release cublas12 asset + id: upload_release_cublas12_asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: flatline_lsp_ubuntu2004_cublas.zip/flatline_lsp_ubuntu2004_cublas.zip - asset_name: flatline_lsp_ubuntu2004_cublas.zip + asset_path: flatline_lsp_ubuntu2004_cublas12.zip/flatline_lsp_ubuntu2004_cublas12.zip + asset_name: flatline_lsp_ubuntu2004_cublas12.zip asset_content_type: application/zip test-on-ubuntu-2004: From 774c58ed58f50928f60c8eef6d69c1efda3c3689 Mon Sep 17 00:00:00 2001 From: okada Date: Tue, 12 Mar 2024 00:25:32 +0900 Subject: [PATCH 2/4] fix --- .github/workflows/build.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3a9072c..1e09414 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,8 +24,10 @@ jobs: defines: '-DLLAMA_BLAS=ON -DLLAMA_BLAS_VENDOR=OpenBLAS' - build: 'cublas11' defines: '-DLLAMA_CUBLAS=ON' + cuda_version: '11.8.0' - build: 'cublas12' defines: '-DLLAMA_CUBLAS=ON' + cuda_version: '12.2.0' steps: - name: Clone @@ -49,15 +51,9 @@ jobs: - uses: Jimver/cuda-toolkit@v0.2.10 id: cuda-toolkit - if: ${{ matrix.build == 'cublas11' }} + if: contains(matrix.build, 'cublas') with: - cuda: '11.8.0' - - - uses: Jimver/cuda-toolkit@v0.2.10 - id: cuda-toolkit - if: ${{ matrix.build == 'cublas12' }} - with: - cuda: '12.2.0' + cuda: ${{ matrix.cuda_version }} - name: Build backend server id: cmake_build_backend_server From 5cfd861580398d178322e97cc60831dffe472e34 Mon Sep 17 00:00:00 2001 From: okada Date: Tue, 12 Mar 2024 00:29:20 +0900 Subject: [PATCH 3/4] fix networkx version for old python --- .github/workflows/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1e09414..3f4542f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -40,6 +40,8 @@ jobs: sudo apt-get update sudo apt-get install -y build-essential libpython3-dev python3 -m pip install cmake + # https://discuss.pytorch.org/t/installing-pytorch-under-python-3-8-question-about-networkx-version/196740 + python3 -m pip install networkx==2.8.8 python3 -m pip install torch --index-url https://download.pytorch.org/whl/cpu python3 -m pip install transformers==4.33.3 tiktoken pygls pyinstaller From f3d19b282c9e086358906fe93d82800cafcdef3b Mon Sep 17 00:00:00 2001 From: okada Date: Tue, 12 Mar 2024 00:32:47 +0900 Subject: [PATCH 4/4] update jimver/cuda-toolkit for cuda12.2.0 --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3f4542f..15432ed 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -51,7 +51,7 @@ jobs: run: | sudo apt-get install -y libopenblas-dev - - uses: Jimver/cuda-toolkit@v0.2.10 + - uses: Jimver/cuda-toolkit@v0.2.14 id: cuda-toolkit if: contains(matrix.build, 'cublas') with: @@ -190,7 +190,7 @@ jobs: run: | sudo apt-get install -y libopenblas0 - - uses: Jimver/cuda-toolkit@v0.2.10 + - uses: Jimver/cuda-toolkit@v0.2.14 id: cuda-toolkit if: ${{ matrix.build == 'cublas' }} with: