Crate rustkernel_derive

Crate rustkernel_derive 

Source
Expand description

Procedural macros for RustKernels.

This crate provides the following macros:

  • #[gpu_kernel] - Define a GPU kernel with metadata
  • #[derive(KernelMessage)] - Derive serialization for kernel messages

§Example

use rustkernel_derive::gpu_kernel;

#[gpu_kernel(
    id = "graph/pagerank",
    mode = "ring",
    domain = "GraphAnalytics",
    throughput = 100_000,
    latency_us = 1.0
)]
pub async fn pagerank_kernel(
    ctx: &mut RingContext,
    request: PageRankRequest,
) -> PageRankResponse {
    // Implementation
}

Attribute Macros§

gpu_kernel
Define a GPU kernel with metadata.
kernel_state
Attribute for marking kernel state types.

Derive Macros§

KernelMessage
Derive macro for kernel messages.