warp-types-builder 0.3.0

Build-time PTX compilation for warp-types GPU kernels
Documentation
  • Coverage
  • 100%
    23 out of 23 items documented1 out of 11 items with examples
  • Size
  • Source code size: 18.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.2 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 27s Average build duration of successful builds.
  • all releases: 20s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • modelmiser/warp-types
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • modelmiser

Build-time PTX compilation for warp-types GPU kernels.

Use in your build.rs to cross-compile a kernel crate to PTX, then load the generated PTX at runtime via cudarc.

Example

// build.rs
warp_types_builder::WarpBuilder::new("my-kernels")
    .build()
    .expect("Failed to compile GPU kernels");

Then in your main crate:

// src/main.rs
mod kernels {
    include!(concat!(env!("OUT_DIR"), "/kernels.rs"));
}

fn main() {
    let ctx = cudarc::driver::CudaContext::new(0).unwrap();
    let k = kernels::Kernels::load(&ctx).unwrap();
    // k.butterfly_reduce — CudaFunction handle ready for launch
}