systile 0.8.0

A TPU-native tiled tensor data structure: the Systolic Tile Lattice. Padding-aware, sublane/lane laid out, bf16/int8 first, with a CPU reference simulator of systolic dataflow.
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
        );
    }
}