4 ms·
You can write a #[cuda] proc macro that: - parses the Rust AST - folds it into a CUDA C AST - writes it to a temporary .cu file - compiles it with nvcc - l
by fluffything 7y ago
You can write a #[cuda] proc macro that:
- parses the Rust AST
- folds it into a CUDA C AST
- writes it to a temporary .cu file
- compiles it with nvcc
- links it into your Rust binary
and that allows you to launch your function as a CUDA kernel.
The Rust emu crate does this (more or less), but targets WebGPU instead of CUDA.