Skip to main content

Crate ringkernel_metal

Crate ringkernel_metal 

Source
Expand description

Metal Backend for RingKernel

This crate provides Apple Metal GPU support for RingKernel. Supports macOS, iOS, and Apple Silicon.

§Features

  • Event-driven kernel execution (Metal compute shaders)
  • MSL (Metal Shading Language) support
  • Apple Silicon optimization
  • Unified memory architecture support

§Limitations

  • No true persistent kernels (Metal doesn’t support cooperative groups)
  • macOS/iOS only

§Example

use ringkernel_metal::MetalRuntime;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let runtime = MetalRuntime::new().await?;
    let kernel = runtime.launch("compute", Default::default()).await?;
    kernel.activate().await?;
    Ok(())
}

Structs§

MetalRuntime
Stub runtime when the backend feature is disabled.

Constants§

K2K_HALO_EXCHANGE_MSL_TEMPLATE
MSL (Metal Shading Language) K2K Halo Exchange template.
RING_KERNEL_MSL_TEMPLATE
MSL (Metal Shading Language) kernel template.

Functions§

is_metal_available
Check if Metal is available at runtime.