Expand description
§kaio-runtime
CUDA runtime layer for the KAIO GPU kernel authoring framework. This
crate wraps cudarc to provide device management, typed device
buffers, PTX module loading, and a builder-style kernel launch API. It
is Layer 2 of KAIO, sitting on top of kaio-core (PTX emission).
§Quick start
ⓘ
use kaio_runtime::{KaioDevice, GpuBuffer};
let device = KaioDevice::new(0)?;
let buf = device.alloc_from(&[1.0f32, 2.0, 3.0])?;
let host = buf.to_host(&device)?;
assert_eq!(host, vec![1.0, 2.0, 3.0]);§GPU-gated tests
Tests that require an NVIDIA GPU are #[ignore]-gated. Run them with:
cargo test -p kaio-runtime -- --ignoredStandard cargo test --workspace runs only host-side tests.
Re-exports§
pub use buffer::GpuBuffer;pub use device::DeviceInfo;pub use device::KaioDevice;pub use error::KaioError;pub use error::Result;pub use module::KaioFunction;pub use module::KaioModule;
Modules§
- buffer
- Typed device memory buffers.
- device
- CUDA device management.
- error
- KAIO error types.
- module
- PTX module loading and kernel function handles.
Structs§
- Launch
Config - Configuration for result::launch_kernel
Traits§
- Push
Kernel Arg - Something that can be copied to device memory and turned into a parameter for result::launch_kernel.