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
// SPDX-License-Identifier: MIT OR Apache-2.0
//! CPU backend computation kernels for fuel.
//!
//! This crate contains the core CPU computation helpers (MatMul, pooling,
//! convolution, reductions, etc.) extracted from `fuel-core` so they can be
//! reused and tested independently. It also re-exports the MKL and Accelerate
//! FFI bindings when the corresponding features are enabled.
// Link glue. `mkl` and `accelerate` declare `extern "C"` FFI against the vendor
// libraries; nothing in this crate NAMES the `-src` crate that supplies the link
// directives, and rustc drops an unreferenced crate from the link line, so
// `extern crate` is what forces the native library in. It lives HERE, beside the
// FFI it serves, so a binary that enables only `fuel-cpu-backend/mkl` links too
// (GAP-348 (b); it used to sit in `fuel-core/src/lib.rs`).
extern crate intel_mkl_src;
extern crate accelerate_src;
/// Phase 7.5 storage-unification target: byte-shaped CPU storage
/// with `Arc<AlignedBytes>` backing, 64-byte alignment, and CoW
/// mutation. Coexists with the legacy `CpuStorage` (HostBuffer-based)
/// during op-kernel migration; legacy retires when the last kernel
/// migrates.
/// Typed byte-shaped kernels — Phase 7.5 B5. These operate on
/// `CpuStorageBytes` directly via `bytemuck` typed views. The
/// dispatch wrapper in `fuel_dispatch::dispatch::cpu_wrappers`
/// extracts `CpuStorageBytes` from `BackendStorage::Cpu(...)` and
/// calls these kernels.
/// Trait-chassis surface shared by elementwise + reduction CPU
/// kernels. One shape/loop pass per kernel family; op-specific math
/// lives in tiny trait impls. See [`chassis::reduction`].
pub use ;
pub use CpuStorage;
pub use *;
pub use CpuQStorage;
pub use *;