Skip to content

Commit

Permalink
Merge pull request #799 from m0nsky/vulkan-llava-build
Browse files Browse the repository at this point in the history
LLaVa Vulkan build actions
  • Loading branch information
martindevans authored Jun 19, 2024
2 parents 5760e66 + 66dc9bb commit 42be432
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@ jobs:
cd build
cmake .. ${{ env.COMMON_DEFINE }} -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_VULKAN=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/vulkan"
cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
#copy $env:RUNNER_TEMP/clblast/lib/clblast.dll .\bin\Release\clblast.dll
# # We should probably generate a sha256 sum in a file, and use that.
# echo "78a8c98bcb2efe1a63318d901ab204d9ba96c3b29707b4ce0c4240bdcdc698d6 ./bin/Release/clblast.dll" >> tmp
# sha256sum -c tmp || exit 255
# rm tmp
ls -R
- name: Build
if: ${{ matrix.os == 'ubuntu-22.04' }}
Expand All @@ -155,23 +150,31 @@ jobs:
cd build
cmake .. ${{ env.COMMON_DEFINE }} -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DLLAMA_VULKAN=ON -DBUILD_SHARED_LIBS=ON
cmake --build . --config Release -j ${env:NUMBER_OF_PROCESSORS}
# if we ever want to pull libvulkan.so back into the packages, just uncomment this line, and the one below for the upload
# cp $(ldconfig -p | grep libvulkan.so | tail -n 1 | cut -d ' ' -f 4) ./
ls -R
- name: Upload artifacts (Windows)
- name: Upload llama artifacts (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
path: |
.\build\bin\Release\llama.dll
path: .\build\bin\Release\llama.dll
name: llama-bin-win-vulkan-x64.dll
- name: Upload artifacts (linux)
- name: Upload llava artifacts (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v4
with:
path: .\build\bin\Release\llava_shared.dll
name: llava-bin-win-vulkan-x64.dll
- name: Upload llama artifacts (Linux)
if: ${{ matrix.os == 'ubuntu-22.04' }}
uses: actions/upload-artifact@v4
with:
path: |
./build/libllama.so
path: ./build/libllama.so
name: llama-bin-linux-vulkan-x64.so
- name: Upload llava artifacts (Linux)
if: ${{ matrix.os == 'ubuntu-22.04' }}
uses: actions/upload-artifact@v4
with:
path: ./build/examples/llava/libllava_shared.so
name: llava-bin-linux-vulkan-x64.so

compile-cublas:
name: Compile (cublas)
Expand Down Expand Up @@ -353,8 +356,11 @@ jobs:
cp artifacts/llama-bin-linux-cublas-cu12.2.0-x64.so/libllama.so deps/cu12.2.0/libllama.so
cp artifacts/llava-bin-linux-cublas-cu12.2.0-x64.so/libllava_shared.so deps/cu12.2.0/libllava_shared.so
cp artifacts/llama-bin-win-vulkan-x64.dll/llama.dll deps/vulkan/
cp artifacts/llama-bin-linux-vulkan-x64.so/libllama.so deps/vulkan/
cp artifacts/llama-bin-win-vulkan-x64.dll/llama.dll deps/vulkan/llama.dll
cp artifacts/llava-bin-win-vulkan-x64.dll/llava_shared.dll deps/vulkan/llava_shared.dll
cp artifacts/llama-bin-linux-vulkan-x64.so/libllama.so deps/vulkan/libllama.so
cp artifacts/llava-bin-linux-vulkan-x64.so/libllava_shared.so deps/vulkan/libllava_shared.so
- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 42be432

Please sign in to comment.