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
//! Interface-segregated sub-traits for [`BackendOps`].
//!
//! This module exports eight single-concern capability traits. `BackendOps`
//! composes the seven capabilities shared by every backend; attention remains
//! an optional `AttentionOps` capability so unrelated scalar kernels do not
//! acquire an unsupported bound. Backends implement each trait independently;
//! the blanket impl in
//! [`crate::backend_ops::trait_def`] provides `BackendOps` automatically. This satisfies
//! the interface-segregation principle: call sites can bound on only the
//! sub-trait they need (e.g. `B: ElementwiseOps<T>`) instead of pulling in
//! all 36 methods.
//!
//! Sub-traits and their concerns:
//! - [`ElementwiseOps`] — binary and unary element-wise ops
//! - [`MatmulOps`] — matmul, batched matmul, accumulate variants
//! - [`ReductionOps`] — reduce, argmax/argmin, topk, cumulative sum/product scans
//! - [`ConvOps`] — regular convolution and 1D/2D transposed convolution
//! - [`PoolOps`] — max/avg pool 1D/2D/3D forward+backward
//! - [`AttentionOps`] — scaled dot-product attention forward+backward
//! - [`OptimizerOps`] — fused SGD/Adam/RMSProp/AdamW/AdaGrad steps
//! - [`UnfoldFoldOps`] — sliding-window unfold and adjoint fold (1D/2D)
//!
//! [`BackendOps`]: super::BackendOps
pub use ;
pub use ;
pub use ElementwiseOps;
pub use MatmulOps;
pub use ;
pub use PoolOps;
pub use RandomInitOps;
pub use ReductionOps;
pub use UnfoldFoldOps;