Crate ringkernel_cpu

Crate ringkernel_cpu 

Source
Expand description

CPU Backend for RingKernel

This crate provides a CPU-based implementation of the RingKernel runtime, primarily used for testing and as a fallback when no GPU is available.

§Features

  • Full implementation of the RingKernelRuntime trait
  • Simulates GPU execution using async tasks
  • Supports all kernel lifecycle operations
  • Useful for unit testing and development

§Example

use ringkernel_cpu::CpuRuntime;
use ringkernel_core::runtime::{RuntimeBuilder, Backend};

#[tokio::main]
async fn main() {
    let runtime = CpuRuntime::new().await.unwrap();
    let kernel = runtime.launch("my_kernel", Default::default()).await.unwrap();
    kernel.activate().await.unwrap();
}

Re-exports§

pub use mock::MockAtomics;
pub use mock::MockGpu;
pub use mock::MockKernelConfig;
pub use mock::MockSharedMemory;
pub use mock::MockThread;
pub use mock::MockWarp;
pub use simd::SimdOps;

Modules§

mock
GPU Mock Testing Utilities
prelude
Prelude for convenient imports.
simd
SIMD-accelerated operations for CPU backend.

Structs§

CpuBuffer
CPU-based buffer that simulates GPU memory.
CpuKernel
CPU-based kernel implementation.
CpuRuntime
CPU-based implementation of RingKernelRuntime.