From e5922e9c905a880112769a0f53e04ebb4e96a2df Mon Sep 17 00:00:00 2001 From: Breadway Date: Fri, 3 Jul 2026 22:38:41 +0800 Subject: [PATCH] Make ORT_MIGRAPHX_MODEL_CACHE_PATH unconditional in packaged systemd unit Without a valid MIGraphX cache dir, ONNX Runtime's MIGraphX EP reads an uninitialized cache path and crashes on the first query rather than just recompiling on every restart -- confirmed by hand while verifying the rocm backend. Previously commented out as an opt-in perf tweak; it's actually required for the rocm backend to work at all, so bakery-installed systems need it set by default. No-op for cpu/npu/cuda backends. Version bump: breadmill 0.2.1 -> 0.2.2. --- Cargo.lock | 2 +- breadmill/Cargo.toml | 2 +- packaging/breadmill.service | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2e7fa2b..5918b71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,7 +133,7 @@ dependencies = [ [[package]] name = "breadmill" -version = "0.2.1" +version = "0.2.2" dependencies = [ "breadsearch-shared", "hex", diff --git a/breadmill/Cargo.toml b/breadmill/Cargo.toml index 5e3822b..dcff332 100644 --- a/breadmill/Cargo.toml +++ b/breadmill/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "breadmill" -version = "0.2.1" +version = "0.2.2" edition = "2021" license = "MIT" diff --git a/packaging/breadmill.service b/packaging/breadmill.service index 70f81e6..a1da0b6 100644 --- a/packaging/breadmill.service +++ b/packaging/breadmill.service @@ -5,10 +5,11 @@ After=default.target [Service] Type=simple -# Uncomment if built with --features rocm: persists MIGraphX's compiled-kernel -# cache across restarts (each new sequence length otherwise costs a ~60-120s -# recompile). See README.md#gpu-backend-notes. -#Environment=ORT_MIGRAPHX_MODEL_CACHE_PATH=%h/.cache/breadsearch/migraphx-cache +# 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 +# crashes on the first query instead of just recompiling every restart. Inert +# for cpu/npu/cuda backends. See README.md#gpu-backend-notes. +Environment=ORT_MIGRAPHX_MODEL_CACHE_PATH=%h/.cache/breadsearch/migraphx-cache ExecStart=%h/.cargo/bin/breadmill Restart=on-failure RestartSec=5