type Order

bendtorch-core@0.1.0.0 · src/tensor/matmul.bend:410

import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matmul
import Base
import bendtorch-core@0.1.0.0/src/tensor/parallel.bend as Parallel

410# Products that read an operand in place. `x @ W^T` and `g^T @ x` read a
411# transposed operand; instead of building the transpose they read the
412# operand at the transposed index. An operand of a product is laid out in
413# one of two orders: `Kept`, as `[outer, inner]`, where term k of output row
414# (or column) `outer` sits at outer * inner + k; or `Swapped`, as
415# `[inner, outer]`, where it sits at k * outers + outer. `matmul` is the
416# product of a `Kept` left and a `Swapped` right operand, `matmul_nt` of two
417# `Kept` operands and `matmul_tn` of two `Swapped` ones. Cell (row, column)
418# adds the inner terms in increasing k from +0.0, as `natural_dot` does. The
419# cells are built by `product_build` below: it forks as `Parallel.build`
420# forks, and below the forks `product_tree` builds them as `Parallel.tree`
421# does, except that eight cells below the count and in one output row run
422# as one loop with eight accumulators (`row_run`).
423type Order is Data:
424  Kept{}
425  Swapped{}

Uses (0)

This definition uses no other definition.

Used by (141)