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
//! SIMD detection and dispatch for CPU kernels
//!
//! This module provides runtime CPU feature detection. Each operation type
//! (matmul, binary, unary, reduce) has its own submodule with SIMD kernels.
//!
//! # Module Structure
//!
//! ```text
//! simd/
//! ├── mod.rs # This file: detection only
//! ├── {operation}/ # Each operation type
//! │ ├── mod.rs # Unified dispatch (handles all architectures)
//! │ ├── x86_64/ # x86-64 implementations
//! │ │ ├── mod.rs
//! │ │ ├── avx2.rs
//! │ │ └── avx512.rs
//! │ └── aarch64/ # ARM64 implementations
//! │ ├── mod.rs
//! │ └── neon.rs
//! ```
//!
//! # Architecture Support
//!
//! | Architecture | Instruction Set | Vector Width | Status |
//! |--------------|-----------------|--------------|-----------|
//! | x86-64 | AVX-512F/VL/DQ/BW + FMA | 512 bits | Supported |
//! | x86-64 | AVX2 + FMA | 256 bits | Supported |
//! | ARM64 | NEON + FP16 | 128 bits | Supported |
//! | ARM64 | NEON | 128 bits | Supported |
//! | Any | Scalar | N/A | Fallback |
// Shared f16/bf16 ↔ f32 SIMD conversion utilities
// Macros for generating f16/bf16 block-convert-compute wrappers (must come before users)
// Always compiled - macros internally gate generated code with #[cfg(feature = "f16")]
// CPU SIMD capability detection
// Operation modules - available on all architectures
// Each operation's mod.rs handles internal architecture dispatch
// x86-64 only: streaming store utilities
pub use ;