nuvec 0.5.0

Pure-Rust MLX for Apple Silicon: lazy arrays on unified memory, composable transforms and Metal kernels
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! An unannotated compiled step does not infer its state type.
#[path = "stub/mod.rs"]
mod stub;
use stub::*;

fn main() {
    let step = compile_mut(|(model, opt), (x, y): &(Array, Array)| {
        let _ = (x, y);
        opt.update(model, model)?;
        Ok(Array)
    });
    let _ = step(&mut (Model { w: Array }, Opt), &(Array, Array));
}