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
//! `BackendRuntime` - **framework-internal** role trait for backend
//! implementations.
//!
//! Backend's atomic opset IS `ai.onnx v1`, and the role op_types ARE
//! the atomic ops. Every `ai.onnx::*` node goes straight to the
//! atomic dispatch table.
//!
//! **Authoring API is the Contract trait, not this one.** Concrete
//! backends implement [`crate::contracts::Backend`] (the 30 mandatory
//! primitives + `execute(&GraphProto, …)`); the
//! `#[derive(bb::Backend)]` proc-macro generates the matching
//! `impl BackendRuntime` that bridges into the engine's
//! atomic-dispatch table. Library makers don't write
//! `impl BackendRuntime` by hand.
//!
//! Distinct from [`bb_dsl::placeholders::Backend`] - the placeholder
//! unit struct Module authors embed as a generic placeholder slot.
use crate;
use crateRuntimeResourceRef;
use crateBackendMaterializeError;
use crateSlotValue;
/// Role trait for backend implementations. Universal contract per
/// `docs/ROLES.md` §2 with no per-role methods (Backend's role
/// opset is `ai.onnx v1` which IS its atomic opset).
///
/// Backends MUST minimally cover `ai.onnx v1` via `atomic_opset`.
/// They MAY declare additional opsets (e.g. `ai.onnx v17` extensions
/// or custom-domain ops like `mybackend.fused.MatMulAdd`) via
/// `extension_opsets`. `Node::ready()` consults both at
/// build time to verify every NodeProto in the loaded graphs has a
/// covering dispatch entry.