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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//! Plan-layer descriptors shared across kernel families: caller
//! preferences, workspace handles, and the numerical-guarantee record
//! every plan exposes.
use DeviceSliceMut;
use crate;
use crateBackendKind;
/// Caller-supplied workspace for a launch.
///
/// Plans never own device memory in baracuda — pass scratch in at
/// `run` time. Pass [`Workspace::None`] for plans whose
/// workspace size is zero.
///
/// **Intentionally NOT `#[non_exhaustive]`** — the two-variant
/// `None` / `Borrowed` split is hot-path-matched by every plan's
/// `run` method, and the API has been stable through 27 alphas. If
/// a third variant (pool-backed, per-stream-cached) ever lands it
/// will be a deliberate breaking change with a major-version bump.
/// Hints that influence kernel selection inside a plan's `select`
/// method.
///
/// The fields are intentionally generic across kernel families — each
/// op category may layer its own `*PlanPreference` wrapper on top
/// (e.g. `GroupedPlanPreference` adds grouped-specific knobs) that
/// embeds this struct.
/// Numerical guarantees a kernel provides.
///
/// Surfaces the salient numerical properties consumers need to decide
/// whether a kernel SKU satisfies an op's precision contract — without
/// having to re-derive them from documentation per kernel.
///
/// All fields are intentionally cheap to compare so this struct can be
/// hashed into selection / autotuner caches.