bend-tensors
Search uses release 0.0.0.2 · 306 definitions
Definitions (306)
- def F32.max.ofBase's F32.max and F32.show take + parameters, which a template slot does not accept; these take plain ones.
- def F32.show.of
- type Blk
- type Vec4
- def Vec4.full
- def Vec4.zeros
- def Vec4.arangex, x + 1, x + 2, x + 3
- def Vec4.map
- def Vec4.zip
- def Vec4.add
- def Vec4.sub
- def Vec4.mul
- def Vec4.scale
- def Vec4.sumthe sum, as (x0 + x1) + (x2 + x3): every reduction in this file pairs its terms the same way, so laws can equate them
- def Vec4.dot
- def Vec4.max
- def Vec4.min
- def Vec4.argmax.pickthe index (0-3) and value of the largest element; the first wins ties
- def Vec4.argmax.two
- def Vec4.argmax
- def Vec4.to_list
- def Vec4.from_listthe first four of xs, padded with 0.0, and the rest
- def Vec4.show
- def Blk.full
- def Blk.zeros
- def Blk.eye
- def Blk.map
- def Blk.zip
- def Blk.add
- def Blk.sub
- def Blk.mul
- def Blk.scale
- def Blk.transpose
- def Blk.matmulm * n: 64 multiply-adds, each cell as (a0 b0 + a1 b1) + (a2 b2 + a3 b3)
- def Blk.matvecm * v: each row dotted with v
- def Blk.sum_rowsrow i's sum, as (a_i0 + a_i1) + (a_i2 + a_i3)
- def Blk.sumthe sum of every cell, as the sum of the row sums
- def Blk.sum_colscolumn j's sum, as (a_0j + a_1j) + (a_2j + a_3j): the row sums of the transpose
- def Blk.max_rows
- def Blk.add_rowv added to every row
- def Blk.sub_rowv subtracted from every row
- def Blk.sub_colrow i subtracted by v_i (the column vector v broadcast along rows)
- def Blk.scale_rowsrow i scaled by v_i
- def Blk.to_listthe 16 cells in row-major order, before acc
- def Blk.from_vec4sa block from its four rows
- def Blk.from_rowsa block from four rows of four; a short row pads with 0.0
- def Blk.row
- def Vec4.maskelements at index >= k set to 0.0
- def Vec4.max_uptothe largest of the first k elements
- def Vec4.min_uptothe smallest of the first k elements
- def Vec4.argmax_uptothe index and value of the largest of the first k elements
- def Blk.mask_rowsrows at index >= k set to 0.0
- def Blk.mask_colscolumns at index >= k set to 0.0
- def Blk.maskrows at index >= ki and columns at index >= kj set to 0.0
- def Blk.max_rows_uptoeach row's largest among its first k columns
- law VecT
- type VecT.Leaf
- type VecT.Node
- def VecT.sizethe element count of a VecT(n): 4 * 2^n
- def VecT.full
- def VecT.zeros
- def VecT.ones
- def VecT.arange.fromx, x + 1, x + 2, ..
- def VecT.arange0, 1, 2, ..
- def VecT.map
- def VecT.zip
- def VecT.add
- def VecT.sub
- def VecT.mulelementwise product
- def VecT.exp
- def VecT.scale
- def VecT.shiftk added to every element
- def VecT.sumthe sum, left half plus right half
- def VecT.dot
- def VecT.max
- def VecT.min
- def VecT.argmax.twothe two halves' winners, the right one's index offset by the half's size
- def VecT.argmaxthe index and value of the largest element; the first wins ties
- def VecT.to_list.gothe elements in order, before acc the tree is read borrowed (+v, matched in place), never consumed: a reader that consumes a shared tree makes the compiler copy it, and bend 2.0.16 miscompiles that copy when the depth is a literal (the bias of a model: memory faults in the loop; issues/shared_vec_loop_*)
- def VecT.to_list
- def VecT.from_listthe first 4 * 2^n elements of xs, padded with 0.0
- def VecT.softmax.fin
- def VecT.softmaxexp(v - max v) / sum
- def VecT.show
- law MatT
- type MatT.Leaf
- type MatT.Rows
- type MatT.Cols
- type MatT.Quad
- def MatT.full
- def MatT.zeros
- def MatT.ones
- def MatT.eyethe identity of MatT(n, n)
- def MatT.map
- def MatT.zip
- def MatT.add
- def MatT.sub
- def MatT.mulelementwise (Hadamard) product; the matrix product is MatT.matmul
- def MatT.exp
- def MatT.scale