Skip to content

Commit fab4da8

Browse files
authored
Merge pull request #11 from spiceai/lukim/spiceai-0.10.1-lockstep
Upgrade spiceai/candle to upstream 0.10.1
2 parents 3ebfe70 + 8315b19 commit fab4da8

666 files changed

Lines changed: 72928 additions & 20640 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
rustflags = ["-C", "target-cpu=native"]
33

44
[target.wasm32-unknown-unknown]
5-
rustflags = ["-C", "target-feature=+simd128"]
5+
rustflags = ["-C", "target-feature=+simd128", "--cfg", 'getrandom_backend="wasm_js"']
66

77
[target.x86_64-apple-darwin]
88
rustflags = ["-C", "target-feature=-avx,-avx2"]

.github/workflows/book-cd.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/book.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/ci_cuda.yaml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ jobs:
99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.run_id }}
1111
cancel-in-progress: true
12-
runs-on:
13-
group: aws-g4dn-2xlarge
14-
container:
15-
image: nvidia/cuda:12.3.1-devel-ubuntu22.04
16-
options: --gpus 0
12+
runs-on: ubuntu-gpu-t4-4-core
1713
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
1814
permissions:
1915
contents: write
@@ -22,13 +18,30 @@ jobs:
2218
# with sigstore/fulcio when running outside of PRs.
2319
id-token: write
2420
security-events: write
21+
env:
22+
CUDA_COMPUTE_CAP: 75
2523
steps:
2624
- name: Checkout repository
27-
uses: actions/checkout@v3
25+
uses: actions/checkout@v6
26+
- name: Setup CUDA toolkit
27+
run: |
28+
# The GPU runner image has CUDA pre-installed, just ensure PATH is set
29+
if command -v nvcc &>/dev/null; then
30+
echo "CUDA already available: $(nvcc --version | grep release)"
31+
elif [ -d /usr/local/cuda ]; then
32+
echo "/usr/local/cuda/bin" >> $GITHUB_PATH
33+
echo "CUDA found at /usr/local/cuda"
34+
else
35+
echo "Installing CUDA toolkit..."
36+
sudo apt-get update
37+
sudo apt-get install -y cuda-toolkit-12-6
38+
echo "/usr/local/cuda-12.6/bin" >> $GITHUB_PATH
39+
echo "LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
40+
fi
2841
- name: Install dependencies
29-
run: apt-get update && apt install curl build-essential libssl-dev protobuf-compiler pkg-config -y
42+
run: sudo apt-get update && sudo apt-get install -y curl build-essential libssl-dev protobuf-compiler pkg-config
3043
- name: Install Rust Stable
31-
uses: actions-rust-lang/setup-rust-toolchain@v1
44+
uses: dtolnay/rust-toolchain@stable
3245
- uses: Swatinem/rust-cache@v2
3346
- name: Test (cuda)
3447
run: cargo test --features cuda

.github/workflows/maturin.yml

-3.29 KB
Binary file not shown.

.github/workflows/python.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,28 @@ jobs:
2020
os: [ubuntu-latest] # For now, only test on Linux
2121
steps:
2222
- name: Checkout repository
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424

2525
- name: Install Rust
26-
uses: actions-rs/toolchain@v1
27-
with:
28-
toolchain: stable
26+
uses: dtolnay/rust-toolchain@stable
2927

3028
- name: Install Python
31-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@v6
3230
with:
33-
python-version: 3.11
31+
python-version: 3.13
3432
architecture: "x64"
3533

3634
- name: Cache Cargo Registry
37-
uses: actions/cache@v1
35+
uses: actions/cache@v5
3836
with:
3937
path: ~/.cargo/registry
4038
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
4139

4240
- name: Install Protoc
4341
uses: arduino/setup-protoc@v2
4442
with:
45-
version: "25.0"
46-
repo-token: ${{ secrets.GITHUB_TOKEN }}
43+
version: "25.0"
44+
repo-token: ${{ secrets.GITHUB_TOKEN }}
4745

4846
- name: Install
4947
working-directory: ./candle-pyo3

.github/workflows/rust-ci.yml

Lines changed: 64 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,68 +11,91 @@ jobs:
1111
name: Check
1212
runs-on: ${{ matrix.os }}
1313
strategy:
14+
fail-fast: false
1415
matrix:
15-
os: [ubuntu-latest, windows-latest, macOS-latest]
16-
rust: [stable]
16+
os: [ubuntu-latest, ubuntu-24.04, windows-latest, macOS-latest, ubuntu-24.04-arm]
1717
steps:
18-
- uses: actions/checkout@v4
19-
- uses: actions-rs/toolchain@v1
20-
with:
21-
profile: minimal
22-
toolchain: ${{ matrix.rust }}
23-
override: true
24-
- uses: actions-rs/cargo@v1
18+
- uses: actions/checkout@v6
19+
- uses: actions/setup-python@v6
2520
with:
26-
command: check
27-
args: --workspace
21+
python-version: "3.13"
22+
- name: Remove cargo config (macOS ring crate fix)
23+
if: runner.os == 'macOS'
24+
run: rm -f .cargo/config.toml
25+
- uses: dtolnay/rust-toolchain@stable
26+
27+
- name: Run macos with metal
28+
if: matrix.os == 'macOS-latest'
29+
run: cargo check --workspace --features metal
30+
31+
- name: Run normal cpu
32+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
33+
run: cargo check --workspace
34+
35+
- name: Run with avx2
36+
if: matrix.os == 'ubuntu-24.04'
37+
run: |
38+
export RUSTFLAGS="-C target-feature=avx2"
39+
cargo check --workspace
40+
41+
- name: Run with arm neon
42+
if: matrix.os == 'ubuntu-24.04-arm'
43+
run: |
44+
export RUSTFLAGS="-C target-feature=neon"
45+
cargo check --workspace
2846
2947
test:
3048
name: Test Suite
3149
runs-on: ${{ matrix.os }}
3250
strategy:
3351
matrix:
3452
os: [ubuntu-latest, windows-latest, macOS-latest]
35-
rust: [stable]
3653
steps:
37-
- uses: actions/checkout@v4
38-
- uses: actions-rs/toolchain@v1
39-
with:
40-
profile: minimal
41-
toolchain: ${{ matrix.rust }}
42-
override: true
43-
- uses: actions-rs/cargo@v1
54+
- name: Free disk space (Linux)
55+
if: runner.os == 'Linux'
56+
run: |
57+
sudo rm -rf /opt/hostedtoolcache
58+
sudo rm -rf /usr/share/dotnet
59+
sudo rm -rf /usr/local/lib/android
60+
sudo rm -rf /opt/ghc
61+
df -h
62+
- uses: actions/checkout@v6
63+
- uses: actions/setup-python@v6
4464
with:
45-
command: test
46-
args: --workspace
65+
python-version: "3.13"
66+
- name: Remove cargo config (macOS ring crate fix)
67+
if: runner.os == 'macOS'
68+
run: rm -f .cargo/config.toml
69+
- uses: dtolnay/rust-toolchain@stable
70+
- name: Install lld (Linux only)
71+
if: runner.os == 'Linux'
72+
run: sudo apt-get update && sudo apt-get install -y lld
73+
- name: Run tests (with lld on Linux)
74+
if: runner.os == 'Linux'
75+
env:
76+
RUSTFLAGS: "-C link-arg=-fuse-ld=lld"
77+
run: cargo test --workspace
78+
- name: Run tests (Windows & macOS)
79+
if: runner.os != 'Linux'
80+
run: cargo test --workspace
4781

4882
fmt:
4983
name: Rustfmt
5084
runs-on: ubuntu-latest
5185
steps:
52-
- uses: actions/checkout@v4
53-
- uses: actions-rs/toolchain@v1
86+
- uses: actions/checkout@v6
87+
- uses: dtolnay/rust-toolchain@stable
5488
with:
55-
profile: minimal
56-
toolchain: stable
57-
override: true
58-
- run: rustup component add rustfmt
59-
- uses: actions-rs/cargo@v1
60-
with:
61-
command: fmt
62-
args: --all -- --check
89+
components: rustfmt
90+
- run: cargo fmt --all -- --check
6391

6492
clippy:
6593
name: Clippy
6694
runs-on: ubuntu-latest
6795
steps:
68-
- uses: actions/checkout@v4
69-
- uses: actions-rs/toolchain@v1
70-
with:
71-
profile: minimal
72-
toolchain: stable
73-
override: true
74-
- run: rustup component add clippy
75-
- uses: actions-rs/cargo@v1
96+
- uses: actions/checkout@v6
97+
- uses: dtolnay/rust-toolchain@stable
7698
with:
77-
command: clippy
78-
args: --workspace --tests --examples -- -D warnings
99+
components: clippy
100+
- run: cargo clippy --workspace --tests --examples --benches -- -D warnings
101+

.github/workflows/trufflehog.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ jobs:
77
trufflehog:
88
runs-on: ubuntu-latest
99
steps:
10-
- name: Checkout code
11-
uses: actions/checkout@v4
12-
with:
13-
fetch-depth: 0
14-
- name: Secret Scanning
15-
uses: trufflesecurity/trufflehog@main
10+
- name: Checkout code
11+
uses: actions/checkout@v6
12+
with:
13+
fetch-depth: 0
14+
- name: Secret Scanning
15+
uses: trufflesecurity/trufflehog@main

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Cargo.lock
1212
# editor config
1313
.helix
1414
.vscode
15+
.zed
1516

1617
# These are backup files generated by rustfmt
1718
**/*.rs.bk

0 commit comments

Comments
 (0)