Start the inference engine from both apps and show its choice in Settings
The desktop names where a package may have put libonnxruntime — an override variable, beside the executable, the package's own library directory, the Flatpak prefix, the system library directory — and Android points at the APK's native library directory, which is also what Qualcomm's DSP loader must be told for the Hexagon skel. Android starts the engine at the end of the model unpack rather than at launch, because the probe fingerprints the model files and a first launch has none until then. The About panel gains an Inference row beside Graphics, re-read every two seconds while the probe runs and engines land, and faces.model_id carries the detector's form: an int8 detector finds a different set of faces and is a different population (docs/inference.md §7). A low-memory signal drops every idle session with the GPU caches. The APK assembly bundles ONNX Runtime and the Qualcomm HTP libraries from Maven, fetched by tools/fetch-android-runtime.sh with their published checksums; RUNTIME_DIR=none builds the tract-only APK, which is a slower app and not a broken one. The desktop packages carry no runtime yet. Two probe fixes from the first desktop run: the floor must not be built with CPU fallback disabled, and a versioned libonnxruntime.so is a runtime too. On the reference desktop the probe now loads ONNX Runtime 1.30, measures 30 ms on the CPU provider, and selects TensorRT at 1.5 ms.
This commit is contained in:
+30
-3
@@ -39,6 +39,7 @@ pub mod identity;
|
||||
mod identity_ui;
|
||||
mod import;
|
||||
mod import_ui;
|
||||
pub mod inference;
|
||||
mod labels;
|
||||
mod library;
|
||||
mod library_ui;
|
||||
@@ -1209,6 +1210,32 @@ pub fn run(paths: Vec<PathBuf>) -> Result<()> {
|
||||
None => window.set_backend("NO GPU".into()),
|
||||
}
|
||||
|
||||
// TRACES: FR-INF-1
|
||||
// What the models run on. Re-read every two seconds because the answer
|
||||
// changes twice after launch — when the probe reports and as each
|
||||
// engine lands — and the page is open for longer than either takes.
|
||||
{
|
||||
let set = |w: &AppWindow| {
|
||||
let (line, detail) = inference::about_lines();
|
||||
w.set_inference_backend(line.into());
|
||||
w.set_inference_detail(detail.into());
|
||||
};
|
||||
set(&window);
|
||||
let weak = window.as_weak();
|
||||
let timer = Rc::new(slint::Timer::default());
|
||||
let held = timer.clone();
|
||||
timer.start(
|
||||
slint::TimerMode::Repeated,
|
||||
std::time::Duration::from_secs(2),
|
||||
move || {
|
||||
let _keep = &held;
|
||||
if let Some(w) = weak.upgrade() {
|
||||
set(&w);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// TRACES: NFR-OPS-1
|
||||
// The diagnostics bundle, wired as the two presses the requirement
|
||||
// describes. Preparing gathers the log and the crash records into memory
|
||||
@@ -1638,7 +1665,7 @@ pub fn run(paths: Vec<PathBuf>) -> Result<()> {
|
||||
library.set_fetch_ahead(stored.cache.fetch_ahead);
|
||||
library.set_write_xmp_sidecars(stored.library.write_xmp_sidecars);
|
||||
library.set_timeline_bars(stored.library.timeline_bars);
|
||||
library.set_face_model_id(stored.faces.detector.model_id());
|
||||
library.set_face_model_id(inference::model_id(stored.faces.detector));
|
||||
}
|
||||
|
||||
// --- the export folder picker ----------------------------------------
|
||||
@@ -1790,7 +1817,7 @@ pub fn run(paths: Vec<PathBuf>) -> Result<()> {
|
||||
// file is installed, and how much of the library that
|
||||
// pipeline has covered — which for a freshly chosen one is
|
||||
// nothing, and saying so is the point.
|
||||
lib.set_face_model_id(s.faces.detector.model_id());
|
||||
lib.set_face_model_id(inference::model_id(s.faces.detector));
|
||||
if let Some(w) = weak.upgrade() {
|
||||
refresh_face_status(&w, &lib, s.faces.detector);
|
||||
}
|
||||
@@ -3933,7 +3960,7 @@ fn refresh_face_status(
|
||||
window,
|
||||
&library.catalog(),
|
||||
store.as_ref(),
|
||||
detector.model_id(),
|
||||
inference::model_id(detector),
|
||||
models.as_ref().is_some_and(|m| m.eyes.is_some()),
|
||||
);
|
||||
window.set_identity_model_missing(models.is_none());
|
||||
|
||||
Reference in New Issue
Block a user