CUDA Backend Plan
The CRISPR engine surface is frozen as (G, L) × (N, L) → (G, N). The first
CUDA milestone should:
- Implement a
score_pairs_encodedkernel in CUDA (guides[G,L],windows[N,L],scores[G,N]). - Mirror the existing C++ CPU semantics exactly (same encoding, penalties, scoring version).
- Expose it via
backend="gpu"increate_crispr_physics. - Validate against the golden fixtures (
tests/data/engine_crispr/). - Benchmark with
benchmarks/engine_crispr_perf.py --backend gpu ....
Keep GPU-specific padding or alignment hidden inside the backend; Python and the simulator should never see it.
Building with CUDA
src/helix_engine/CMakeLists.txt exposes HELIX_ENGINE_ENABLE_CUDA=ON. When
set, CMake enables the CUDA language and compiles src/physics_cuda.cu (currently
just a stub). Example:
cmake -S src/helix_engine -B build/helix_engine -DHELIX_ENGINE_ENABLE_CUDA=ON
Future patches will replace the stub with a real kernel and plumb the Python
backend selection through backend="gpu".