1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// SPDX-License-Identifier: MIT OR Apache-2.0
//! Dispatch-table cache — compat shim + the one Tensor-dependent write
//! path.
//!
//! The storage/lookup mechanics ([`cached`], [`cached_oracle`],
//! [`invalidate`], the process-wide slot, and the `DispatchTable`/
//! `ProfileJudgeOracle` types) moved to
//! [`fuel_dispatch::judge_cache`] (board #109 PR-D follow-up) — this
//! file had zero `Tensor` dependency except [`populate_dispatch_table`]
//! below, which runs [`crate::judge::Judge`] (genuinely `Tensor`-dependent
//! — it realizes real tensor ops across backends to profile them, the
//! reason `judge/mod.rs` stayed in `fuel-tensor` at all in #305).
//!
//! `docs/restructure-migration-design.md` §5.1 Row 3 (RULED 2026-09-02)
//! called a bare `cache.rs -> fuel-dispatch` move clean; that was measured
//! before #305 landed `judge/mod.rs` in `fuel-tensor`, and a bare move
//! would have recreated the `fuel-dispatch -> fuel-tensor` cycle #305 was
//! built to avoid (see that doc's amended note). The fix inverts the one
//! write path instead: this file RUNS the judge (needs `Tensor`) and
//! HANDS the finished report down via
//! [`fuel_dispatch::judge_cache::store`] — a downward call, no cycle.
//! Every other symbol below is a straight re-export so
//! `crate::judge::cached()` / `fuel_tensor::judge::cache::cached()` /
//! `fuel::judge::cached()` etc. are unchanged for callers.
pub use ;
/// Force-populate the dispatch table by running the probe + judge matrix
/// and persisting the result.
///
/// Idempotent: if a table is already cached (in memory or via the lazy
/// disk-load on first access), returns immediately. To force a fresh
/// measurement (driver upgrade, hardware change), call [`invalidate`]
/// first.
///
/// Apps that want zero startup cost should call this from a background
/// thread; the routed-op path falls through to default backends until the
/// populate completes. Apps that prefer determinism should call this on
/// the main thread at startup — blocks for tens of seconds on first-ever
/// run, instant on every subsequent run thanks to disk cache.