pub fn load_jit<B: Backend>(
source: &str,
device: B::Device,
config: RuntimeConfig,
) -> Result<JitExecutor<B>>Expand description
Parse, lower, validate, optimize, and JIT-compile a .sw program.
This is the recommended entry point for production use — it produces a JIT executor that runs graphs faster than the interpreter.
§Example
ⓘ
let jit = load_jit::<CpuBackend>(source, CpuDevice, RuntimeConfig::default())?;
let result = jit.run("Forward", &inputs)?;