knok-build 0.3.0

Build-script graph tracing and code generation for knok
docs.rs failed to build knok-build-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Build-script frontend for knok static graph tracing.

This crate is used from build.rs, not from the final target crate. A build script defines graph functions with [graph], executes them with traced tensor values through [compile_graphs], and writes generated wrappers plus VMFB artifacts into OUT_DIR.

use knok_build::prelude::*;

#[knok_build::graph(backend = Backend::LlvmCpu)]
fn forward(x: T2<f32, 2, 2>) -> T2<f32, 2, 2> {
    relu(matmul(x.clone(), x) + 1.0)
}

fn main() {
    knok_build::compile_graphs!(forward);
}

Target crates import the generated wrappers with knok::generated_graphs!(pub mod graphs);.