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
// 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: [2, 2];
        const mask = [[1.0, 0.0], [0.0]] : F32;   // ragged rows
        let y = x * mask;
        out y;
    };
}