Repository navigation
Upstream Comparison and CPU Optimization
Amadeus edited this page Nov 29, 2026
·
4 revisions
Keep track of how 21cmCU relates to upstream 21cmfast/21cmFAST (v4.3.2), its 93 CUDA C APIs / 57 CFFI exports, its 5 zero-precision-loss CPU optimizations, and the features beyond upstream in v1.0.0 – v1.2.0-dev.
| Upstream Release / PR | Upstream Feature | Status in 21cmCU
|
Notes |
|---|---|---|---|
v4.1.0 – v4.3.2 |
v4 C-backend, discrete halos, ComputeLF, cached coeval reads (#821, #825), #826), angular pre-interp (#819) |
Synced (93 CUDA C APIs / 57 CFFI exports) |
Checked by python scripts/check_cuda_abi.py
|
PR #818 |
Fixed-and-Paired Initial Conditions | Implemented |
fixed_paired_initial_conditions(...) in py21cmcu.shortcuts
|
PR #834 / #820 |
Lightconer protocol & HEALPix angular lightcones | Complementary |
RectilinearLightconer, ObliqueRectilinearLightconer, lightcone_ksz_map
|
PR #763 / #631 |
Fuzzy Dark Matter (FDM) & Primordial |
Stage 3 Roadmap | Scheduled in ROADMAP.md |
All 5 optimizations preserve bit-level/numerical parity (max_abs = 0.0) relative to the baseline CPU C path:
| Optimization | Module / Stage | Result |
|---|---|---|
| Cache-blocked 3D transpose & SIMD FFTW |
PerturbField, SpinTemperature, IonisationBox
|
max_abs = 0.0 |
| Fused halo-to-grid deposit |
HaloCatalog CIC/NGP scatter |
max_abs = 0.0 |
| Reusable FFTW & CUDA host buffers |
fftw_wisdom.c & cuda_api
|
max_abs = 0.0 |
| NUMA-aware OpenMP loop scheduling | Multi-redshift evolution loops | max_abs = 0.0 |
| Batched spin-temperature interpolation | SpinTemperature.c |
max_abs = 0.0 |
-
Native Inference Engine (completed, formerly Direction P):
PriorTransform,NativeNestedSampler,NativeEnsembleMCMC,audit_posterior_native,BatchPoolmulti-GPU evaluation, andv1.1.0-devdistributed collectives (distributed_likelihood_eval,NCCL/gloo) with SHA-256 checkpoint provenance. -
Multi-Probe & Active SBI (
v1.0.0→v1.2.0-dev):cross_power_21cm_galaxy,ksz_momentum_map,lightcone_ksz_map,UVLFLikelihood,JointLikelihood,fixed_paired_initial_conditions,select_active_sbi_points, andActiveSBILoop.
- Full standalone document: UPSTREAM_AND_OPTIMIZATION.md
- Performance numbers and CUDA layout: Architecture Overview & Multi-Probe & Fisher
- Forward plan: ROADMAP.md
21cmCU v1.0.0 · Native C/CUDA + cuFFT Engine for 21cmFAST v4 · See CHANGELOG.md and BENCHMARKS.md in the main repository.
Getting Started
Simulation & Science Pipelines
- Precision Modes & Calibration
- Multi-GPU & Large Grids
- Distributed NCCL & Multi-Node
- Residency & I/O
- SBI & Batch Pipeline
- Bayesian Inference & Samplers
- Multi-Probe, Fisher & Topology
- Interferometer Mock & Forecast
- Lightcone Optimization & 3D Viz
Reference