Expand description
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
}Structs§
- Build
Result - Result of a successful build.
- Warp
Builder - Builder for cross-compiling kernel crates to GPU assembly.
Enums§
- Build
Error - Errors that can occur during kernel compilation.
- GpuTarget
- GPU target for cross-compilation.