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§
- Metal
Runtime - 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.