Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
# - Excluded: local (CPU inference - pulls in CUDA deps via mistralrs)
# - Excluded: cuda, cuda-flash-attn, cuda-flash-attn-v3 (CUDA features)
cargo test -p spnl --features cli_support,print,lisp,run,ollama,openai,gemini,pull,yaml,metal,rag,rag-deep-debug,spnl-api,vllm,k8s,gce,ffi,pypi,run_py,tok,openssl-vendored -- --nocapture
cargo test -p spnl-cli --features rag,spnl-api,vllm,k8s,gce,local,metal -- --nocapture
cargo test -p spnl-cli --features bench,rag,spnl-api,vllm,k8s,gce,local,metal -- --nocapture
else
# Test default features on Linux (no GPU features)
cargo test -p spnl -p spnl-cli -- --nocapture
Expand All @@ -108,7 +108,7 @@ jobs:
if: runner.os == 'macOS'
run: |
cargo clippy -p spnl --features cli_support,print,lisp,run,ollama,openai,gemini,pull,yaml,metal,rag,rag-deep-debug,spnl-api,vllm,k8s,gce,ffi,pypi,run_py,tok,openssl-vendored --tests --no-deps -- -D warnings
cargo clippy -p spnl-cli --features rag,spnl-api,vllm,k8s,gce,local,metal --tests --no-deps -- -D warnings
cargo clippy -p spnl-cli --features bench,rag,spnl-api,vllm,k8s,gce,local,metal --tests --no-deps -- -D warnings

- name: rustfmt
run: cargo fmt --all -- --check
8 changes: 4 additions & 4 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
run: |
# Only use openssl-vendored for musl builds (static linking)
# Other platforms use system OpenSSL
cargo build --features $LOCAL_FEATURE,rag,k8s,gce,spnl-api $BUILD_RELEASE_ARG --package spnl-cli --target $TARGET
cargo build --features $LOCAL_FEATURE,bench,rag,k8s,gce,spnl-api $BUILD_RELEASE_ARG --package spnl-cli --target $TARGET

- name: Check for Apple signing secrets
if: runner.os == 'macOS'
Expand Down Expand Up @@ -318,7 +318,7 @@ jobs:
if: matrix.platform.arch == 'x86_64'
shell: sh
run: |
apk add --no-cache musl-dev gcc protobuf-dev curl unzip perl make
apk add --no-cache musl-dev gcc g++ protobuf-dev curl unzip perl make

- name: Setup Rust toolchain
shell: sh
Expand All @@ -328,7 +328,7 @@ jobs:
- name: Build CLI
shell: sh
run: |
cargo build --features $LOCAL_FEATURE,rag,k8s,gce,spnl-api,openssl-vendored $BUILD_RELEASE_ARG --package spnl-cli --target $TARGET
cargo build --features $LOCAL_FEATURE,bench,rag,k8s,gce,spnl-api,openssl-vendored $BUILD_RELEASE_ARG --package spnl-cli --target $TARGET

- name: Prepare binary
shell: sh
Expand Down Expand Up @@ -522,7 +522,7 @@ jobs:
echo "Building with features: $FEATURES,rag,k8s,gce,spnl-api"
echo "CUDA_COMPUTE_CAP: $CUDA_COMPUTE_CAP"
echo "CUDA_NVCC_FLAGS: $CUDA_NVCC_FLAGS"
cargo build --features $FEATURES,rag,k8s,gce,spnl-api $BUILD_RELEASE_ARG \
cargo build --features $FEATURES,bench,rag,k8s,gce,spnl-api $BUILD_RELEASE_ARG \
--package spnl-cli --target $TARGET

- name: Prepare binary
Expand Down
14 changes: 9 additions & 5 deletions Cargo.lock

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

12 changes: 12 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ metal = ["local","spnl/metal"]
cuda = ["local","spnl/cuda"]
cuda-flash-attn = ["local","spnl/cuda-flash-attn"]
cuda-flash-attn-v3 = ["local","spnl/cuda-flash-attn-v3"]
bench = ["dep:criterion", "dep:lipsum", "dep:petname", "dep:dirs", "dep:csv", "dep:rand", "dep:reqwest", "dep:indicatif", "dep:tokenizers"]

[dependencies]
anyhow = "1.0.99"
Expand All @@ -35,3 +36,14 @@ spnl = { version = ">=0.1.0", path = "../spnl" }
tabled = { version = "0.20", optional = true }
tinytemplate = "1.2.1"
tokio = { version = "1.44.2", features = ["rt-multi-thread"] }

# bench dependencies
criterion = { version = "0.8", features = ["async_tokio"], optional = true }
csv = { version = "1.3", optional = true }
dirs = { version = "6.0", optional = true }
indicatif = { version = "0.18.0", optional = true }
lipsum = { git = "https://github.com/mgeisler/lipsum.git", optional = true }
petname = { version = "2.0.2", optional = true }
rand = { version = "0.9.2", optional = true }
reqwest = { version = "0.12", features = ["blocking", "json"], optional = true }
tokenizers = { version = "0.22.0", default-features = false, features = ["onig", "esaxx_fast", "hf-hub", "http"], optional = true }
7 changes: 7 additions & 0 deletions cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ pub enum Commands {
#[cfg(feature = "local")]
List,

/// Run benchmarks
#[cfg(feature = "bench")]
Bench {
#[command(subcommand)]
command: crate::bench::BenchCommands,
},

/// Bring up vLLM in a Kubernetes cluster
#[cfg(feature = "vllm")]
Vllm {
Expand Down
Loading
Loading