pub trait DeviceFn<Args: DeviceSend> {
type Output: DeviceSend;
// Required method
fn execute(args: Args) -> impl Future<Output = Self::Output>;
}Expand description
Device function trait, generated by #[device] macro.
cargo <subcommand>: execute() runs the original function body on CPU. cargo furiosa-opt <subcommand>:
execute() loads the compiled EDF and runs on NPU.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.