~/bend-docscommunity

tensor_tiled_indexed.bend checks

raw source on the hub · import stelliferous@0.0.4.0/tensor_tiled_indexed.bend as Tensor_tiled_indexed

Indexed maps of the cells of a tiled tensor: each lane receives the row-major index of its value in the logical shape. Lane l of the cell of outer index o = b * after + r and group g is value (b * lanes + 8 * g + l) * after + r, so the lanes of a cell step by after.

5 imports
import Base
import ./kernel_tile.bend as Tile
import ./tensor_grid.bend as Grid
import ./traversal_array.bend as Traversal
import ./traversal_blocks.bend as TraversalBlocks

Types

type Indexing source · line 13 · raw

Data

The axes of the logical shape around the lane axis, where the groups lie, and the first cell of the piece.

type Call source · line 46 · raw

Data

Definitions

def index_of source · line 16 · raw

@+outer:U32 -> @+group:U32 -> @+after:U32 -> @+lanes:U32 -> U32

def index_at source · line 20 · raw

@position:0xa2af805348d03b11eb853850859654f6/tensor_grid.Position -> @+cell:U32 -> @+outer:U32 -> @+after:U32 -> @+lanes:U32 -> @+groups:U32 -> U32

def lane_index source · line 25 · raw

@context:Indexing -> @+position:U32 -> U32

def lane_step source · line 29 · raw

@context:Indexing -> U32

Templates

template lanes source · line 33 · raw

@-operation:(@_:U32 -> @_:F32 -> F32) -> @+index:U32 -> @+step:U32 -> @tile:0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8 -> 0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8

template cell source · line 38 · raw

@-operation:(@_:U32 -> @_:F32 -> F32) -> @+context:Indexing -> @+position:U32 -> @read:Pair(Array<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8>, 0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8) -> Pair(Array<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8>, 0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8)

template read source · line 42 · raw

@-operation:(@_:U32 -> @_:F32 -> F32) -> @input:Array<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8> -> @context:Indexing -> @position:U32 -> Pair(Array<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8>, 0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8)

template run source · line 49 · raw

@-operation:(@_:U32 -> @_:F32 -> F32) -> @call:Call -> @input:Array<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8> -> @output:Array<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8> -> Pair(Array<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8>, Array<0xa2af805348d03b11eb853850859654f6/kernel_tile.Tile8>)