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::{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;
37pub mod intrinsics;
38pub mod kernel_config;
39pub mod kernels;
40pub mod llada2_gate;
41pub mod lm_head;
42pub mod moe_residency;
43pub mod moe_split;
44pub mod moe_topk_capture;
45pub mod ms_deform_attn;
46pub mod naive;
47pub mod onnx_control_flow;
48pub mod onnx_indexing;
49pub mod onnx_ref;
50pub mod op_registry;
51pub mod supported_ops;
52pub use supported_ops::SUPPORTED_OPS;
53pub mod pool;
54pub mod splat;
55pub mod thunk;
56pub mod tile;
57pub mod training_bwd;
58pub mod umap_knn;
59pub mod vmath;