Fix ROCm backend (target MIGraphX EP) and add CUDA support
ROCm silently fell back to CPU: the code targeted ONNX Runtime's classic ROCMExecutionProvider, but distro ROCm-enabled ONNX Runtime builds (e.g. Arch's onnxruntime-rocm) are commonly compiled with --use_migraphx instead, and registration failures were invisible since breadmill never installed a tracing subscriber. Switches the rocm feature to target MIGraphX, adds a default tracing subscriber so EP registration success/failure is always visible, and fixes a real crash where MIGraphX's output sequence padding could index the attention mask out of bounds during mean-pooling. Also adds a CUDA backend (--cuda / backend = "cuda") mirroring the same ort execution-provider pattern, for NVIDIA hardware. Version bump: 0.1.0 -> 0.2.0.
This commit is contained in:
parent
d3843f3131
commit
2618a33fd5
10 changed files with 227 additions and 96 deletions
|
|
@ -1,13 +1,19 @@
|
|||
[package]
|
||||
name = "breadmill"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
npu = ["ort/vitis", "ort/load-dynamic"]
|
||||
rocm = ["ort/rocm", "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"]
|
||||
|
||||
[[bin]]
|
||||
name = "breadmill"
|
||||
|
|
@ -26,6 +32,10 @@ breadsearch-shared = { path = "../breadsearch-shared" }
|
|||
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"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue