Name the crate dr-inference-engine

This commit is contained in:
2026-09-19 16:02:37 +02:00
parent 6739fdf908
commit caf21bea64
+7 -7
View File
@@ -329,14 +329,14 @@ int8 included, subject to §10's own acceptance.
---
## 8. Crate shape — `core/dr-infer`
## 8. Crate shape — `core/dr-inference-engine`
The seam is the same shape as [storage.md](storage.md)'s: a small crate below the consumers that is
the **only** place naming a provider, a library file or a vendor, with the consumers reduced to
"give me a session for these bytes in this role".
```
core/dr-infer
core/dr-inference-engine
src/lib.rs Runtime (Tract | Onnx { lib, version }), Backend (rung), Role (Detector | Embedder | Segmenter)
src/probe.rs §4 — the ladder per platform, the session-build probe, the cache file
src/engines.rs §6 — background compilation, the cache directory, progress
@@ -345,9 +345,9 @@ core/dr-infer
```
- `dr-face` and `dr-segment` **delete** their private `install_backend` and their direct
`Session::builder()` calls and take an `&dr_infer::Sessions` where they take model bytes today.
Their tests keep `tract` — `dr_infer::Sessions::tract()` is a constructor and the test-only path.
- `dr-infer` depends on `ort` with the same workspace features as today plus `cuda`, `tensorrt`,
`Session::builder()` calls and take an `&dr_inference_engine::Sessions` where they take model bytes today.
Their tests keep `tract` — `dr_inference_engine::Sessions::tract()` is a constructor and the test-only path.
- `dr-inference-engine` depends on `ort` with the same workspace features as today plus `cuda`, `tensorrt`,
`qnn`: those features add option builders, not linking, under `alternative-backend`. **Verified
for the QNN, CUDA and TensorRT builders on 2026-09-19** — they go through the API table's generic
`SessionOptionsAppendExecutionProvider*`. The NNAPI builder resolves a symbol directly and would
@@ -357,7 +357,7 @@ core/dr-infer
`inference_cache_dir()` beside `shared_face_models_dir()`, on the same account-independent
footing and for the same reason.
- The Android entry point's `install_bundled_models` also extracts nothing new: `jniLibs/` is
loaded by the system loader, and `dr-infer` on Android looks for `libonnxruntime.so` through
loaded by the system loader, and `dr-inference-engine` on Android looks for `libonnxruntime.so` through
`dlopen` by bare name first, which resolves to the APK's copy, before any directory.
---
@@ -401,7 +401,7 @@ M1 and M2 are the ones the rest is conditional on, and M2 is the one that needs
## 11. Order
1. **`dr-infer` with the two tables and the floor** — `set_api` from a dlopened runtime, tract
1. **`dr-inference-engine` with the two tables and the floor** — `set_api` from a dlopened runtime, tract
otherwise, ORT CPU as the only rung. Consumers moved over; tests unchanged. This alone is the
3–10× and is the build most of the value sits in. M1.
2. **The probe and its cache** (§4), with the settings row and the about line. Still CPU-only;