Adds breadmill's `full` feature (npu + rocm + cuda together) and switches the release workflow to build with it. All three backends are ort's load-dynamic (dlopen) mode, so combining them doesn't require the NPU/ROCm/ CUDA toolkits on the build host -- which backend is actually available is resolved at runtime via ORT_DYLIB_PATH / the dynamic linker, per whichever backend is selected for that run. Also fixes a real bug this surfaced: backend selection checked `config.model.backend == "rocm"` unconditionally in an if/else-if chain, so an explicit --cuda (or --npu) flag silently lost to an unrelated `backend` value already sitting in config.toml. CLI flags now always take priority over config. Version bump: breadmill 0.2.0 -> 0.2.1.
72 lines
2.5 KiB
TOML
72 lines
2.5 KiB
TOML
[package]
|
|
name = "breadmill"
|
|
version = "0.2.1"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
|
|
[features]
|
|
default = []
|
|
npu = ["ort/vitis", "ort/load-dynamic"]
|
|
# "rocm" targets the MIGraphX execution provider, not ONNX Runtime's classic
|
|
# ROCMExecutionProvider (--use_rocm build). Distro ROCm-enabled ONNX Runtime
|
|
# packages (e.g. Arch's onnxruntime-rocm) are commonly built with --use_migraphx
|
|
# instead; the classic ROCm EP needs a bespoke --use_rocm build that ships
|
|
# libonnxruntime_providers_rocm.so, which most distros don't package.
|
|
rocm = ["ort/migraphx", "ort/load-dynamic"]
|
|
cuda = ["ort/cuda", "ort/load-dynamic"]
|
|
# All backends in one binary. Safe to combine: every backend here uses
|
|
# ort's load-dynamic (dlopen) mode, so none of this links against an actual
|
|
# NPU/ROCm/CUDA toolkit at build time — which ONNX Runtime actually gets
|
|
# loaded (and thus which EPs are really available) is decided at runtime by
|
|
# ORT_DYLIB_PATH / the dynamic linker, per the --npu/--rocm/--cuda flag or
|
|
# `backend` config value in use for that run.
|
|
full = ["npu", "rocm", "cuda"]
|
|
|
|
[[bin]]
|
|
name = "breadmill"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
breadsearch-shared = { path = "../breadsearch-shared" }
|
|
|
|
# Embedding: ONNX Runtime + HF tokenizers
|
|
# download-binaries: fetches the MLAS-optimized ORT 1.24.x at build time (CPU default).
|
|
# api-23: compatible with both the downloaded ORT 1.24.x and the Ryzen AI SDK ORT 1.23.3;
|
|
# ORT 1.24 is backwards-compatible and honours GetApi(23) requests.
|
|
# npu feature adds load-dynamic + vitis: dlopen at runtime lets ORT_DYLIB_PATH redirect
|
|
# to the Ryzen AI SDK ORT; rpath from download-binaries means no ORT_DYLIB_PATH
|
|
# needed for the plain CPU path even in the npu build.
|
|
ort = { version = "2.0.0-rc.12", default-features = false, features = ["std", "tracing", "download-binaries", "tls-native", "copy-dylibs", "api-23"] }
|
|
tokenizers = "0"
|
|
|
|
# Surfaces ort's own EP-registration tracing (e.g. a GPU EP silently failing to
|
|
# register and falling back to CPU) as visible log output instead of nowhere.
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# Vector index
|
|
usearch = "2"
|
|
|
|
# Metadata store
|
|
rusqlite = { version = "0", features = ["bundled"] }
|
|
|
|
# File walking (respects .gitignore)
|
|
ignore = "0"
|
|
|
|
# Live filesystem watching
|
|
notify = "6"
|
|
|
|
# Text extraction
|
|
pdf-extract = "0"
|
|
zip = "2"
|
|
quick-xml = { version = "0", features = ["serialize"] }
|
|
|
|
# Hashing
|
|
sha2 = "0"
|
|
hex = "0"
|
|
|
|
# HTTP for model download
|
|
ureq = "2"
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|