rlx-tensor 0.2.18

Native ndarray alternative for RLX — NumPy-style tensors that trace, fuse, and run on any backend via the rlx compiler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RLX — versatile ML compiler + runtime.
// Copyright (C) 2026 Eugene Hauptmann, Nataliya Kosmyna.
// SPDX-License-Identifier: MIT OR Apache-2.0
use rlx_tensor::rlx;

fn main() {
    let _g = rlx! {
        input x: [4, 4];
        repeat 2 {
            param w: [4, 4];   // would collide each iteration
            let x = x @ w;
        }
        out x;
    };
}