Skip to content

Commit

Permalink
chore(ci): build manylinux binary with vulkan support. (#1660)
Browse files Browse the repository at this point in the history
* chore(ci): build manylinux with vulkan support binary.

* fix(ci): fix install vulkan sdk.

* fix(ci): skip glslang validation after installing vulkan sdk.

* fix(ci): use icycodes/install-vulkan-sdk@v1.1.1-patch to install vulkan sdk.
  • Loading branch information
icycodes authored Mar 14, 2024
1 parent b66d7a5 commit 136d420
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ jobs:
container: ${{ matrix.container }}
strategy:
matrix:
binary: [aarch64-apple-darwin, x86_64-manylinux2014, x86_64-windows-msvc, x86_64-manylinux2014-cuda117, x86_64-manylinux2014-cuda122, x86_64-windows-msvc-cuda117, x86_64-windows-msvc-cuda122]
binary:
- aarch64-apple-darwin
- x86_64-manylinux2014
- x86_64-manylinux2014-cuda117
- x86_64-manylinux2014-cuda122
- x86_64-manylinux2014-vulkan
- x86_64-windows-msvc
- x86_64-windows-msvc-cuda117
- x86_64-windows-msvc-cuda122
include:
- os: macos-latest
target: aarch64-apple-darwin
Expand All @@ -48,6 +56,12 @@ jobs:
binary: x86_64-manylinux2014-cuda122
container: sameli/manylinux2014_x86_64_cuda_12.2
build_args: --features static-ssl --features cuda,prod-db
- os: dimerun-k3-ubuntu2204
target: x86_64-unknown-linux-gnu
binary: x86_64-manylinux2014-vulkan
container: quay.io/pypa/manylinux2014_x86_64
build_args: --features static-ssl,vulkan,prod-db
vulkan_sdk: '1.3.204.1'
- os: windows-latest
target: x86_64-pc-windows-msvc
binary: x86_64-windows-msvc
Expand Down Expand Up @@ -118,6 +132,13 @@ jobs:
sub-packages: '["nvcc", "cudart", "cublas", "cublas_dev", "thrust", "visual_studio_integration"]'
if: runner.os == 'Windows' && matrix.windows_cuda != ''

- name: Install Vulkan SDK
uses: icycodes/install-vulkan-sdk@v1.1.1-patch
with:
version: ${{ matrix.vulkan_sdk }}
cache: true
if: matrix.vulkan_sdk != ''

- name: Bulid release binary
run: cargo build ${{ matrix.build_args }} --release --target ${{ matrix.target }} --package tabby

Expand Down
3 changes: 3 additions & 0 deletions crates/llama-cpp-bindings/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ fn build_llama_cpp() {
println!("cargo:rustc-link-lib=hipblas");
}
if cfg!(feature = "vulkan") {
if let Ok(vulkan_sdk_path) = env::var("VULKAN_SDK") {
println!("cargo:rustc-link-search=native={}/lib", vulkan_sdk_path);
}
config.define("LLAMA_VULKAN", "ON");
println!("cargo:rustc-link-lib=vulkan");
}
Expand Down

0 comments on commit 136d420

Please sign in to comment.