Skip to content

Commit

Permalink
Add Cuda 11 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
xnorpx committed Dec 11, 2023
1 parent 160ec88 commit 35f4961
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 9 deletions.
50 changes: 49 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,82 @@ jobs:
os: ubuntu-latest
rust: stable
computecap: 61
cuda: '11.8.0'
- build: win
os: windows-latest
rust: stable
computecap: 61
cuda: '11.8.0'
- build: linux
os: ubuntu-latest
rust: stable
computecap: 75
cuda: '11.8.0'
- build: win
os: windows-latest
rust: stable
computecap: 75
cuda: '11.8.0'
- build: linux
os: ubuntu-latest
rust: stable
computecap: 86
cuda: '11.8.0'
- build: win
os: windows-latest
rust: stable
computecap: 86
cuda: '11.8.0'
- build: linux
os: ubuntu-latest
rust: stable
computecap: 89
cuda: '11.8.0'
- build: win
os: windows-latest
rust: stable
computecap: 89
cuda: '11.8.0'
- build: linux
os: ubuntu-latest
rust: stable
computecap: 61
cuda: '12.1.0'
- build: win
os: windows-latest
rust: stable
computecap: 61
cuda: '12.1.0'
- build: linux
os: ubuntu-latest
rust: stable
computecap: 75
cuda: '12.1.0'
- build: win
os: windows-latest
rust: stable
computecap: 75
cuda: '12.1.0'
- build: linux
os: ubuntu-latest
rust: stable
computecap: 86
cuda: '12.1.0'
- build: win
os: windows-latest
rust: stable
computecap: 86
cuda: '12.1.0'
- build: linux
os: ubuntu-latest
rust: stable
computecap: 89
cuda: '12.1.0'
- build: win
os: windows-latest
rust: stable
computecap: 89
cuda: '12.1.0'

steps:
- name: Checkout repository
Expand All @@ -80,7 +128,7 @@ jobs:
- uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '12.1.0'
cuda: ${{ matrix.cuda }}
method: 'network'
sub-packages: '[]'
non-cuda-sub-packages: '["libcublas"]'
Expand Down
68 changes: 66 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,34 +58,98 @@ jobs:
os: ubuntu-latest
rust: stable
computecap: 61
cuda: '12.1.0'
cudaver: 12
- build: win
os: windows-latest
rust: stable
computecap: 61
cuda: '12.1.0'
cudaver: 12
- build: linux
os: ubuntu-latest
rust: stable
computecap: 75
cuda: '12.1.0'
cudaver: 12
- build: win
os: windows-latest
rust: stable
computecap: 75
cuda: '12.1.0'
cudaver: 12
- build: linux
os: ubuntu-latest
rust: stable
computecap: 86
cuda: '12.1.0'
cudaver: 12
- build: win
os: windows-latest
rust: stable
computecap: 86
cuda: '12.1.0'
cudaver: 12
- build: linux
os: ubuntu-latest
rust: stable
computecap: 89
cuda: '12.1.0'
cudaver: 12
- build: win
os: windows-latest
rust: stable
computecap: 89
cuda: '12.1.0'
cudaver: 12
- build: linux
os: ubuntu-latest
rust: stable
computecap: 61
cuda: '11.8.0'
cudaver: 11
- build: win
os: windows-latest
rust: stable
computecap: 61
cuda: '11.8.0'
cudaver: 11
- build: linux
os: ubuntu-latest
rust: stable
computecap: 75
cuda: '11.8.0'
cudaver: 11
- build: win
os: windows-latest
rust: stable
computecap: 75
cuda: '11.8.0'
cudaver: 11
- build: linux
os: ubuntu-latest
rust: stable
computecap: 86
cuda: '11.8.0'
cudaver: 11
- build: win
os: windows-latest
rust: stable
computecap: 86
cuda: '11.8.0'
cudaver: 11
- build: linux
os: ubuntu-latest
rust: stable
computecap: 89
cuda: '11.8.0'
cudaver: 11
- build: win
os: windows-latest
rust: stable
computecap: 89
cuda: '11.8.0'
cudaver: 11

steps:
- name: Checkout repository
Expand All @@ -104,7 +168,7 @@ jobs:
- uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '12.1.0'
cuda: ${{ matrix.cuda }}
method: 'network'
sub-packages: '[]'
non-cuda-sub-packages: '["libcublas"]'
Expand All @@ -128,7 +192,7 @@ jobs:
shell: bash
run: |
version="${{ needs.create-release.outputs.version }}"
echo "ARCHIVE=blue_candle-$version-${{ matrix.build }}-cuda-CC-${{matrix.computecap}}" >> $GITHUB_ENV
echo "ARCHIVE=blue_candle-$version-${{ matrix.build }}-cuda-${{matrix.cudaver}}-CC-${{matrix.computecap}}" >> $GITHUB_ENV
- name: Creating directory for archive
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "blue-candle"
version = "0.1.0"
version = "0.3.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -10,13 +10,14 @@ mkl = ["dep:intel-mkl-src", "candle-core/mkl", "candle-nn/mkl"]

default = []
cuda = ["candle-core/cuda", "candle-nn/cuda"]
[dependencies]

[dependencies]
anyhow = "1"
axum = { version = "0", features = ["multipart"] }
candle-core = "0"
candle-nn = "0"
clap = { version = "4", features = ["derive"] }
fast_image_resize = "*"
futures = "0"
intel-mkl-src = { version = "0", optional = true }
hf-hub = { version = "0", features = ["tokio"] }
Expand All @@ -35,7 +36,5 @@ tokio-util = { version = "0", features = ["codec"] }
tracing = "0"
tracing-subscriber = "0"
uuid = { version = "1", features = ["v4"] }

zune-jpeg = "*"
zune-core = "*"
fast_image_resize = "*"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Our goal with Blue Candle is to provide an accessible, user-friendly, and effici

2. **Check CUDA Compatibility:**
- If you are using the CUDA version, ensure your GPU is compatible. Blue Candle supports compute capabilities 6.1 or higher. You can check your GPU's compute capability on the [NVIDIA CUDA GPUs page](https://developer.nvidia.com/cuda-gpus). Also ensure you
have [NVIDIA CUDA Toolkit](https://developer.nvidia.com/cuda-downloads) installed.
have [NVIDIA CUDA Toolkit](https://developer.nvidia.com/cuda-downloads) installed. Currently we pre-build binaries for CUDA 11 and CUDA 12. Make sure to have the bin directory in path so that Blue-candle can find the Cuda shared libraries.

3. **Check CPU Compatibility:**
- The prebuilt release binaries is built for [AVX2](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions). The first intel processor with AVX2 was Haswell 2013. If your CPU does not support AVX2 then you need to build yourself or file a ticket so a
Expand Down

0 comments on commit 35f4961

Please sign in to comment.