ringkernel-cpu
CPU backend implementation for RingKernel.
Overview
This crate provides a CPU-based implementation of the RingKernelRuntime trait. It serves two purposes:
- Development and Testing: Test kernel logic without GPU hardware
- Fallback: Run on systems without GPU support
The CPU backend implements the full RingKernel API including kernel lifecycle, message queues, HLC timestamps, and K2K messaging.
Usage
use CpuRuntime;
async
Features
- Full
RingKernelRuntimeimplementation - Lock-free message queues using crossbeam
- HLC timestamp generation
- K2K messaging support
- Kernel lifecycle management (Created, Active, Paused, Terminated)
Performance
The CPU backend is optimized for correctness over performance. For production workloads requiring high throughput, use the CUDA or WebGPU backends.
Typical performance characteristics:
- Message throughput: ~10M messages/sec
- Latency: <1ms per message batch
Testing
When to Use
- Unit testing kernel logic
- Development without GPU hardware
- CI/CD pipelines
- Systems without GPU support
- Debugging message flow
License
Apache-2.0