# std/tile

Integer matrix tiles: `mmaInt8` and `mmaUInt8`, the CPU oracle a GPU tile must equal bit for bit.

Each adds a 16 by 32 A tile of 8-bit integers times a 32 by 16 B tile to a 16 by 16 `Int32` accumulator. Every tile is row-major, and the sums wrap as `Int32` arithmetic does, never saturating, so integer addition modulo 2^32 leaves no order to differ in. `acc` plus `a` times `b`, each element widened by `wide`: element (i, j) is `acc[16i + j]` plus the sum over k below 32 of `a[32i + k] * b[16k + j]`.

## mmaInt8

`fn`, at line 33.

```vyrn
fn mmaInt8(a: read Array<Int8, 512>, b: read Array<Int8, 512>, acc: Array<Int32, 256>) -> Array<Int32, 256>
```

`acc` plus `a` times `b` for `Int8` tiles: A is 16 by 32, B 32 by 16 and `acc` 16 by 16, row-major. The sums wrap.

## mmaUInt8

`fn`, at line 39.

```vyrn
fn mmaUInt8(a: read Array<UInt8, 512>, b: read Array<UInt8, 512>, acc: Array<Int32, 256>) -> Array<Int32, 256>
```

`acc` plus `a` times `b` for `UInt8` tiles, shaped as for `mmaInt8`. The sums wrap.

---

From https://vyrn-lang.github.io/docs/std/tile.html — generated by `site/export.vyrn` from the Vyrn repository.
