Skip to main content

rlx_cpu/
lib.rs

1// RLX — versatile ML compiler + runtime.
2// Copyright (C) 2026 Eugene Hauptmann, Nataliya Kosmyna.
3// SPDX-License-Identifier: MIT OR Apache-2.0
4
5//! RLX CPU backend — executes optimized IR graphs on CPU.
6//!
7//! Takes a fused + memory-planned IR graph and executes it using:
8//! - BLAS (Accelerate/MKL/OpenBLAS) for matmul
9//! - NEON/AVX SIMD kernels for element-wise ops
10//! - Persistent Rayon thread pool for parallelism
11//! - Arena allocator for zero per-call allocation
12
13pub mod arena;
14pub mod asm_check;
15pub mod attention_bwd;
16pub mod autotune;
17pub mod blas;
18pub mod calibrate;
19pub mod config;
20pub mod conv3d_bwd;
21pub mod conv_bwd;
22pub mod conv_fwd;
23pub mod cost;
24pub mod dequant_cache;
25pub mod dispatch;
26pub mod executor;
27pub mod expand;
28pub use expand::{NO_THUNK_ARM, expand_cpu_nop_fused, prepare_graph_for_thunks};
29pub mod gdn;
30pub mod gguf_matmul;
31pub mod gguf_scheme;
32pub mod iir; // IIR biquad zero-phase Butterworth filtering (filter-bank front-end)
33pub mod spd; // SPD-manifold Riemannian kernels (logm/expm/sqrtm, AIRM distance, Karcher mean, batched eigh)
34pub mod spd_kernels; // CpuKernel impls for the core SPDNet ops (BiMap/ReEig/LogEig/SpdBatchNorm)
35pub use gguf_scheme::quant_scheme_for_ggml;
36pub mod im2col;
37#[cfg(all(feature = "int8-gemv", target_arch = "x86_64"))]
38mod int8_gemv;
39pub mod intrinsics;
40pub mod kernel_config;
41pub mod kernels;
42pub mod llada2_gate;
43pub mod lm_head;
44pub mod moe_residency;
45pub mod moe_split;
46pub mod moe_topk_capture;
47pub mod ms_deform_attn;
48pub mod naive;
49pub mod onnx_control_flow;
50pub mod onnx_indexing;
51pub mod onnx_ref;
52pub mod op_registry;
53pub mod supported_ops;
54pub use supported_ops::SUPPORTED_OPS;
55pub mod pool;
56pub mod splat;
57pub mod thunk;
58pub mod tile;
59pub mod training_bwd;
60pub mod umap_knn;
61pub mod vmath;