systile 1.0.0

Matmul-native data structures & algorithms: 17 structures (holographic memory, semiring graphs, automata, attention, DFT, Viterbi, k-NN, Bloom, sort, scan, …) whose core operation reduces to a dense matmul, built on a TPU-style tiled tensor with a systolic reference engine.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Inspect how an awkward shape pads up to tile boundaries.
//!
//! Run with `cargo run --example padding_inspect`.

use systile::prelude::*;

fn main() {
    for &(rows, cols) in &[(1usize, 1usize), (3, 5), (8, 128), (130, 257)] {
        let shape = Shape::new(rows, cols, &Geometry::TPU_V);
        println!(
            "{rows:>4}x{cols:<4} -> {:>4}x{:<4} padded  |  {:>6.1}% padding",
            shape.padded_rows,
            shape.padded_cols,
            shape.padding_ratio() * 100.0
        );
    }
}