Add OpenVINO backend for Intel iGPU/dGPU (Arc)
Mirrors the rocm/cuda pattern: ort::ep::OpenVINO with device_type "GPU" (covers both Intel integrated graphics and Arc discrete GPUs through the same EP), load-dynamic/dlopen so no OpenVINO toolkit is needed at build time, and its own --openvino flag / backend = "openvino" config value. Folded into the `full` feature alongside npu/rocm/cuda. OpenVINO's provider options go through a generic key/value FFI interface rather than a fixed C struct (unlike MIGraphX's OrtMIGraphXProviderOptions), so it should be less exposed to the ABI-version-skew crash MIGraphX hit -- but that's inference from the EP's design, not verified against real hardware. Like CUDA, this is compile-checked only: no Intel GPU in this dev environment to runtime-verify against. Version bump: breadmill 0.2.2 -> 0.2.3.
This commit is contained in:
parent
e5922e9c90
commit
c6ed6a41d8
8 changed files with 112 additions and 35 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -133,7 +133,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "breadmill"
|
name = "breadmill"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"breadsearch-shared",
|
"breadsearch-shared",
|
||||||
"hex",
|
"hex",
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,9 @@ Start from `breadbox/breadbox/src/main.rs`. **Reuse verbatim:** the gtk4-layer-s
|
||||||
- nomic prefixes + mean-pool + normalize must match between index and query or recall collapses.
|
- nomic prefixes + mean-pool + normalize must match between index and query or recall collapses.
|
||||||
- `ort` linking: prefer the crate's downloaded/bundled ONNX Runtime to avoid version skew with Arch's `onnxruntime`.
|
- `ort` linking: prefer the crate's downloaded/bundled ONNX Runtime to avoid version skew with Arch's `onnxruntime`.
|
||||||
- Office formats (docx/odt) are best-effort in v1; md/txt/org/pdf are the reliable path.
|
- Office formats (docx/odt) are best-effort in v1; md/txt/org/pdf are the reliable path.
|
||||||
- GPU EPs (ROCm/CUDA) fail to register silently at the ONNX Runtime level and fall back to CPU — always check
|
- GPU EPs (ROCm/CUDA/OpenVINO) fail to register silently at the ONNX Runtime level and fall back to CPU — always
|
||||||
startup logs for `Successfully registered` before trusting a GPU build is actually accelerating. See
|
check startup logs for `Successfully registered` before trusting a GPU build is actually accelerating. See
|
||||||
[README: GPU backend notes](README.md#gpu-backend-notes) for the MIGraphX-vs-ROCMExecutionProvider distinction
|
[README: GPU backend notes](README.md#gpu-backend-notes) for the MIGraphX-vs-ROCMExecutionProvider distinction
|
||||||
and the per-shape JIT-compile-and-cache behavior that matters for interactive query latency.
|
and the per-shape JIT-compile-and-cache behavior that matters for interactive query latency.
|
||||||
|
- CUDA and OpenVINO are compile-checked only — no NVIDIA or Intel GPU hardware in this dev environment (AMD-only)
|
||||||
|
to runtime-verify against, unlike ROCm which was confirmed end-to-end on real hardware.
|
||||||
|
|
|
||||||
57
README.md
57
README.md
|
|
@ -21,10 +21,11 @@ Optional features:
|
||||||
|
|
||||||
| Feature | What it adds |
|
| Feature | What it adds |
|
||||||
|---------|-------------|
|
|---------|-------------|
|
||||||
| `npu` | AMD XDNA NPU via VitisAI ONNX Runtime EP (requires Ryzen AI SDK) |
|
| `npu` | AMD XDNA NPU via VitisAI ONNX Runtime EP (requires Ryzen AI SDK) |
|
||||||
| `rocm` | AMD iGPU via the MIGraphX ONNX Runtime EP (ROCm-backed) |
|
| `rocm` | AMD iGPU via the MIGraphX ONNX Runtime EP (ROCm-backed) |
|
||||||
| `cuda` | NVIDIA GPU via the CUDA ONNX Runtime EP |
|
| `cuda` | NVIDIA GPU via the CUDA ONNX Runtime EP |
|
||||||
| `full` | All three of the above in one binary |
|
| `openvino` | Intel iGPU/dGPU (Arc) via the OpenVINO ONNX Runtime EP |
|
||||||
|
| `full` | All four of the above in one binary |
|
||||||
|
|
||||||
```
|
```
|
||||||
# NPU build
|
# NPU build
|
||||||
|
|
@ -36,25 +37,29 @@ cargo build --release -p breadmill --features rocm
|
||||||
# CUDA (NVIDIA GPU) build
|
# CUDA (NVIDIA GPU) build
|
||||||
cargo build --release -p breadmill --features cuda
|
cargo build --release -p breadmill --features cuda
|
||||||
|
|
||||||
|
# OpenVINO (Intel iGPU/dGPU) build
|
||||||
|
cargo build --release -p breadmill --features openvino
|
||||||
|
|
||||||
# All backends in one binary (what the release build ships)
|
# All backends in one binary (what the release build ships)
|
||||||
cargo build --release -p breadmill --features full
|
cargo build --release -p breadmill --features full
|
||||||
```
|
```
|
||||||
|
|
||||||
`rocm`/`cuda`/`npu` all use `ort`'s `load-dynamic` mode: at runtime, breadmill
|
`rocm`/`cuda`/`npu`/`openvino` all use `ort`'s `load-dynamic` mode: at runtime,
|
||||||
dlopens whatever `libonnxruntime.so` the dynamic linker resolves (or
|
breadmill dlopens whatever `libonnxruntime.so` the dynamic linker resolves (or
|
||||||
`ORT_DYLIB_PATH` if set). GPU acceleration only works if that ONNX Runtime
|
`ORT_DYLIB_PATH` if set). GPU acceleration only works if that ONNX Runtime
|
||||||
build actually has the matching execution provider compiled in — breadmill
|
build actually has the matching execution provider compiled in — breadmill
|
||||||
logs a clear `Successfully registered` / `not enabled in this build` line for
|
logs a clear `Successfully registered` / `not enabled in this build` line for
|
||||||
this at startup (see [GPU backend notes](#gpu-backend-notes) below).
|
this at startup (see [GPU backend notes](#gpu-backend-notes) below).
|
||||||
|
|
||||||
Because all three are dlopen-based, `full` doesn't require the NPU/ROCm/CUDA
|
Because all four are dlopen-based, `full` doesn't require the NPU/ROCm/CUDA/
|
||||||
toolkits to be installed at build time — only at run time, and only for
|
OpenVINO toolkits to be installed at build time — only at run time, and only
|
||||||
whichever single backend you actually select via `--npu`/`--rocm`/`--cuda`
|
for whichever single backend you actually select via
|
||||||
or `backend` in config.toml. The **released binaries are built with
|
`--npu`/`--rocm`/`--cuda`/`--openvino` or `backend` in config.toml. The
|
||||||
`full`**: same binary works CPU-only out of the box, and picks up NPU/ROCm/CUDA
|
**released binaries are built with `full`**: same binary works CPU-only out
|
||||||
acceleration on a machine that has the matching ONNX Runtime available,
|
of the box, and picks up NPU/ROCm/CUDA/OpenVINO acceleration on a machine
|
||||||
without needing a different download. An explicit `--npu`/`--rocm`/`--cuda`
|
that has the matching ONNX Runtime available, without needing a different
|
||||||
flag always overrides `backend` in config.toml, not the other way around.
|
download. An explicit `--npu`/`--rocm`/`--cuda`/`--openvino` flag always
|
||||||
|
overrides `backend` in config.toml, not the other way around.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
|
|
@ -117,6 +122,7 @@ breadmill status
|
||||||
breadmill --npu
|
breadmill --npu
|
||||||
breadmill --rocm
|
breadmill --rocm
|
||||||
breadmill --cuda
|
breadmill --cuda
|
||||||
|
breadmill --openvino
|
||||||
```
|
```
|
||||||
|
|
||||||
## Config
|
## Config
|
||||||
|
|
@ -137,7 +143,7 @@ snippet_len = 200 # max characters in result snippet
|
||||||
[model]
|
[model]
|
||||||
name = "nomic-embed-text-v1.5"
|
name = "nomic-embed-text-v1.5"
|
||||||
dim = 768
|
dim = 768
|
||||||
backend = "cpu" # "cpu", "npu", "rocm", or "cuda"
|
backend = "cpu" # "cpu", "npu", "rocm", "cuda", or "openvino"
|
||||||
```
|
```
|
||||||
|
|
||||||
`roots` and `excludes` support `~/` expansion. The index respects `.gitignore` files found during the walk.
|
`roots` and `excludes` support `~/` expansion. The index respects `.gitignore` files found during the walk.
|
||||||
|
|
@ -154,10 +160,11 @@ Set `backend = "npu"` in config (or pass `--npu`) when running a build compiled
|
||||||
|
|
||||||
### GPU backend notes
|
### GPU backend notes
|
||||||
|
|
||||||
Both `rocm` and `cuda` need a system ONNX Runtime that was actually built with
|
`rocm`, `cuda`, and `openvino` all need a system ONNX Runtime that was
|
||||||
the matching execution provider — the crate's own downloaded binary is CPU-only.
|
actually built with the matching execution provider — the crate's own
|
||||||
Point `ORT_DYLIB_PATH` at one, or install a distro package that provides
|
downloaded binary is CPU-only. Point `ORT_DYLIB_PATH` at one, or install a
|
||||||
`libonnxruntime.so` with the EP baked in and let the dynamic linker find it.
|
distro package that provides `libonnxruntime.so` with the EP baked in and
|
||||||
|
let the dynamic linker find it.
|
||||||
|
|
||||||
**ROCm (`--rocm` / `backend = "rocm"`)** targets ONNX Runtime's **MIGraphX**
|
**ROCm (`--rocm` / `backend = "rocm"`)** targets ONNX Runtime's **MIGraphX**
|
||||||
execution provider, not the classic `ROCMExecutionProvider`. Distro
|
execution provider, not the classic `ROCMExecutionProvider`. Distro
|
||||||
|
|
@ -183,6 +190,18 @@ noticeable for interactive query embedding.
|
||||||
CUDA/cuDNN install. Unverified on real NVIDIA hardware in this repo — only
|
CUDA/cuDNN install. Unverified on real NVIDIA hardware in this repo — only
|
||||||
compile-checked, since development happened on an AMD-only machine.
|
compile-checked, since development happened on an AMD-only machine.
|
||||||
|
|
||||||
|
**OpenVINO (`--openvino` / `backend = "openvino"`)** targets
|
||||||
|
`OpenVINOExecutionProvider` with `device_type = "GPU"`, covering both Intel
|
||||||
|
iGPUs and Arc dGPUs through the same EP (OpenVINO abstracts Intel's whole
|
||||||
|
hardware line — CPU/GPU/NPU — behind one provider and a device-type string).
|
||||||
|
Needs an OpenVINO-enabled ONNX Runtime and the OpenVINO runtime itself
|
||||||
|
installed. Its options go through a generic key/value FFI interface rather
|
||||||
|
than a fixed C struct (unlike MIGraphX's `OrtMIGraphXProviderOptions`), so it
|
||||||
|
should be less exposed to the kind of ABI-version-skew crash MIGraphX hit —
|
||||||
|
but that's inference from reading the EP's design, not something verified
|
||||||
|
against real Intel GPU hardware. Also unverified on real hardware in this
|
||||||
|
repo — only compile-checked, for the same reason as CUDA.
|
||||||
|
|
||||||
## Runtime paths
|
## Runtime paths
|
||||||
|
|
||||||
| Purpose | Path |
|
| Purpose | Path |
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "breadmill"
|
name = "breadmill"
|
||||||
version = "0.2.2"
|
version = "0.2.3"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
||||||
|
|
@ -14,13 +14,17 @@ npu = ["ort/vitis", "ort/load-dynamic"]
|
||||||
# libonnxruntime_providers_rocm.so, which most distros don't package.
|
# libonnxruntime_providers_rocm.so, which most distros don't package.
|
||||||
rocm = ["ort/migraphx", "ort/load-dynamic"]
|
rocm = ["ort/migraphx", "ort/load-dynamic"]
|
||||||
cuda = ["ort/cuda", "ort/load-dynamic"]
|
cuda = ["ort/cuda", "ort/load-dynamic"]
|
||||||
|
# Intel iGPU/dGPU (Arc) + CPU via OpenVINO. One EP covers Intel's whole
|
||||||
|
# hardware line by device_type string ("CPU"/"GPU"/"GPU.0"/"NPU"/"HETERO:...");
|
||||||
|
# we always request "GPU" since CPU is already covered by the cpu backend.
|
||||||
|
openvino = ["ort/openvino", "ort/load-dynamic"]
|
||||||
# All backends in one binary. Safe to combine: every backend here uses
|
# 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
|
# 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
|
# NPU/ROCm/CUDA/OpenVINO toolkit at build time — which ONNX Runtime actually
|
||||||
# loaded (and thus which EPs are really available) is decided at runtime by
|
# gets loaded (and thus which EPs are really available) is decided at
|
||||||
# ORT_DYLIB_PATH / the dynamic linker, per the --npu/--rocm/--cuda flag or
|
# runtime by ORT_DYLIB_PATH / the dynamic linker, per the --npu/--rocm/
|
||||||
# `backend` config value in use for that run.
|
# --cuda/--openvino flag or `backend` config value in use for that run.
|
||||||
full = ["npu", "rocm", "cuda"]
|
full = ["npu", "rocm", "cuda", "openvino"]
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "breadmill"
|
name = "breadmill"
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,11 @@ pub enum Backend {
|
||||||
Rocm,
|
Rocm,
|
||||||
/// NVIDIA GPU via the CUDA ONNX Runtime execution provider.
|
/// NVIDIA GPU via the CUDA ONNX Runtime execution provider.
|
||||||
Cuda,
|
Cuda,
|
||||||
|
/// Intel iGPU/dGPU (Arc) via the OpenVINO ONNX Runtime execution
|
||||||
|
/// provider, requesting device_type "GPU". `cache_dir` stores OpenVINO's
|
||||||
|
/// compiled-model blobs between runs (its own `with_cache_dir`, not an
|
||||||
|
/// env var — unlike MIGraphX this doesn't need a workaround).
|
||||||
|
OpenVino { cache_dir: PathBuf },
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct OrtEmbedder {
|
pub struct OrtEmbedder {
|
||||||
|
|
@ -165,6 +170,7 @@ fn configure_eps(builder: SessionBuilder, backend: &Backend) -> Result<SessionBu
|
||||||
Backend::Npu { cache_dir } => npu_session(builder, cache_dir),
|
Backend::Npu { cache_dir } => npu_session(builder, cache_dir),
|
||||||
Backend::Rocm => rocm_session(builder),
|
Backend::Rocm => rocm_session(builder),
|
||||||
Backend::Cuda => cuda_session(builder),
|
Backend::Cuda => cuda_session(builder),
|
||||||
|
Backend::OpenVino { cache_dir } => openvino_session(builder, cache_dir),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -253,6 +259,36 @@ fn cuda_session(builder: SessionBuilder) -> Result<SessionBuilder, String> {
|
||||||
Ok(builder)
|
Ok(builder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ---- OpenVINO EP (Intel iGPU/dGPU) -------------------------------------------
|
||||||
|
|
||||||
|
#[cfg(feature = "openvino")]
|
||||||
|
fn openvino_session(builder: SessionBuilder, cache_dir: &Path) -> Result<SessionBuilder, String> {
|
||||||
|
let ov_cache = cache_dir.join("openvino");
|
||||||
|
std::fs::create_dir_all(&ov_cache).map_err(|e| e.to_string())?;
|
||||||
|
eprintln!("breadmill: using OpenVINO execution provider (device_type GPU)");
|
||||||
|
eprintln!("breadmill: OpenVINO model cache: {}", ov_cache.display());
|
||||||
|
eprintln!(
|
||||||
|
"breadmill: note — check the log line above/below for \"Successfully registered \
|
||||||
|
`OpenVINOExecutionProvider`\"; if it's missing, the ONNX Runtime in use wasn't built \
|
||||||
|
with OpenVINO support and inference silently fell back to CPU"
|
||||||
|
);
|
||||||
|
builder
|
||||||
|
.with_execution_providers([
|
||||||
|
ort::ep::OpenVINO::default()
|
||||||
|
.with_device_type("GPU")
|
||||||
|
.with_cache_dir(ov_cache.to_string_lossy())
|
||||||
|
.build(),
|
||||||
|
ort::ep::CPU::default().build(),
|
||||||
|
])
|
||||||
|
.map_err(|e| e.to_string())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "openvino"))]
|
||||||
|
fn openvino_session(builder: SessionBuilder, _cache_dir: &Path) -> Result<SessionBuilder, String> {
|
||||||
|
eprintln!("breadmill: OpenVINO backend requested but not compiled in (rebuild with --features openvino); using CPU");
|
||||||
|
Ok(builder)
|
||||||
|
}
|
||||||
|
|
||||||
/// Locate the VitisAI EP config file required by the AMD Ryzen AI SDK.
|
/// Locate the VitisAI EP config file required by the AMD Ryzen AI SDK.
|
||||||
///
|
///
|
||||||
/// Search order:
|
/// Search order:
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,14 @@ fn main() {
|
||||||
let use_npu = raw_args.iter().any(|a| a == "--npu");
|
let use_npu = raw_args.iter().any(|a| a == "--npu");
|
||||||
let use_rocm = raw_args.iter().any(|a| a == "--rocm");
|
let use_rocm = raw_args.iter().any(|a| a == "--rocm");
|
||||||
let use_cuda = raw_args.iter().any(|a| a == "--cuda");
|
let use_cuda = raw_args.iter().any(|a| a == "--cuda");
|
||||||
|
let use_openvino = raw_args.iter().any(|a| a == "--openvino");
|
||||||
|
|
||||||
// Build a view of argv without backend flags for command matching.
|
// Build a view of argv without backend flags for command matching.
|
||||||
|
let backend_flags = ["--npu", "--rocm", "--cuda", "--openvino"];
|
||||||
let args: Vec<&str> = raw_args
|
let args: Vec<&str> = raw_args
|
||||||
.iter()
|
.iter()
|
||||||
.skip(1)
|
.skip(1)
|
||||||
.filter(|a| a.as_str() != "--npu" && a.as_str() != "--rocm" && a.as_str() != "--cuda")
|
.filter(|a| !backend_flags.contains(&a.as_str()))
|
||||||
.map(|s| s.as_str())
|
.map(|s| s.as_str())
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|
@ -59,7 +61,7 @@ fn main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some("--reindex") | Some("reindex") => {
|
Some("--reindex") | Some("reindex") => {
|
||||||
if let Err(e) = run_daemon(true, use_npu, use_rocm, use_cuda) {
|
if let Err(e) = run_daemon(true, use_npu, use_rocm, use_cuda, use_openvino) {
|
||||||
eprintln!("breadmill: {}", e);
|
eprintln!("breadmill: {}", e);
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
|
|
@ -76,7 +78,7 @@ fn main() {
|
||||||
cli_status();
|
cli_status();
|
||||||
}
|
}
|
||||||
None | Some("serve") | Some("--serve") => {
|
None | Some("serve") | Some("--serve") => {
|
||||||
if let Err(e) = run_daemon(false, use_npu, use_rocm, use_cuda) {
|
if let Err(e) = run_daemon(false, use_npu, use_rocm, use_cuda, use_openvino) {
|
||||||
eprintln!("breadmill: {}", e);
|
eprintln!("breadmill: {}", e);
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
|
|
@ -84,7 +86,7 @@ fn main() {
|
||||||
Some(cmd) => {
|
Some(cmd) => {
|
||||||
eprintln!("breadmill: unknown command: {}", cmd);
|
eprintln!("breadmill: unknown command: {}", cmd);
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"usage: breadmill [serve|reindex|fetch-model|query <text>|status] [--npu|--rocm|--cuda] [--version]"
|
"usage: breadmill [serve|reindex|fetch-model|query <text>|status] [--npu|--rocm|--cuda|--openvino] [--version]"
|
||||||
);
|
);
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
|
|
@ -93,7 +95,13 @@ fn main() {
|
||||||
|
|
||||||
// ---- Daemon -----------------------------------------------------------------
|
// ---- Daemon -----------------------------------------------------------------
|
||||||
|
|
||||||
fn run_daemon(force_reindex: bool, use_npu: bool, use_rocm: bool, use_cuda: bool) -> Result<(), String> {
|
fn run_daemon(
|
||||||
|
force_reindex: bool,
|
||||||
|
use_npu: bool,
|
||||||
|
use_rocm: bool,
|
||||||
|
use_cuda: bool,
|
||||||
|
use_openvino: bool,
|
||||||
|
) -> Result<(), String> {
|
||||||
let config = breadsearch_shared::Config::load();
|
let config = breadsearch_shared::Config::load();
|
||||||
let state_dir = breadsearch_shared::state_dir();
|
let state_dir = breadsearch_shared::state_dir();
|
||||||
let cache_dir = breadsearch_shared::cache_dir();
|
let cache_dir = breadsearch_shared::cache_dir();
|
||||||
|
|
@ -115,6 +123,8 @@ fn run_daemon(force_reindex: bool, use_npu: bool, use_rocm: bool, use_cuda: bool
|
||||||
"rocm"
|
"rocm"
|
||||||
} else if use_cuda {
|
} else if use_cuda {
|
||||||
"cuda"
|
"cuda"
|
||||||
|
} else if use_openvino {
|
||||||
|
"openvino"
|
||||||
} else {
|
} else {
|
||||||
config.model.backend.as_str()
|
config.model.backend.as_str()
|
||||||
};
|
};
|
||||||
|
|
@ -132,6 +142,10 @@ fn run_daemon(force_reindex: bool, use_npu: bool, use_rocm: bool, use_cuda: bool
|
||||||
eprintln!("breadmill: CUDA backend selected");
|
eprintln!("breadmill: CUDA backend selected");
|
||||||
Backend::Cuda
|
Backend::Cuda
|
||||||
}
|
}
|
||||||
|
"openvino" => {
|
||||||
|
eprintln!("breadmill: OpenVINO backend selected");
|
||||||
|
Backend::OpenVino { cache_dir: cache_dir.clone() }
|
||||||
|
}
|
||||||
_ => Backend::Cpu,
|
_ => Backend::Cpu,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,8 @@ pub struct ModelConfig {
|
||||||
pub name: String,
|
pub name: String,
|
||||||
#[serde(default = "default_dim")]
|
#[serde(default = "default_dim")]
|
||||||
pub dim: usize,
|
pub dim: usize,
|
||||||
/// Compute backend: "cpu", "npu" (VitisAI/XDNA), "rocm" (MIGraphX/AMD GPU), or "cuda" (NVIDIA GPU).
|
/// Compute backend: "cpu", "npu" (VitisAI/XDNA), "rocm" (MIGraphX/AMD GPU),
|
||||||
|
/// "cuda" (NVIDIA GPU), or "openvino" (Intel iGPU/dGPU).
|
||||||
#[serde(default = "default_backend")]
|
#[serde(default = "default_backend")]
|
||||||
pub backend: String,
|
pub backend: String,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ Type=simple
|
||||||
# Required (not just a perf tweak) when backend = "rocm": without a valid
|
# Required (not just a perf tweak) when backend = "rocm": without a valid
|
||||||
# cache dir, ONNX Runtime's MIGraphX EP reads an uninitialized cache path and
|
# cache dir, ONNX Runtime's MIGraphX EP reads an uninitialized cache path and
|
||||||
# crashes on the first query instead of just recompiling every restart. Inert
|
# crashes on the first query instead of just recompiling every restart. Inert
|
||||||
# for cpu/npu/cuda backends. See README.md#gpu-backend-notes.
|
# for cpu/npu/cuda/openvino backends (openvino's cache dir is set in code,
|
||||||
|
# not via env var). See README.md#gpu-backend-notes.
|
||||||
Environment=ORT_MIGRAPHX_MODEL_CACHE_PATH=%h/.cache/breadsearch/migraphx-cache
|
Environment=ORT_MIGRAPHX_MODEL_CACHE_PATH=%h/.cache/breadsearch/migraphx-cache
|
||||||
ExecStart=%h/.cargo/bin/breadmill
|
ExecStart=%h/.cargo/bin/breadmill
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue