def accumulate
bendtorch-core@0.1.0.0 · src/autograd/gradient.bend:120
import bendtorch-core@0.1.0.0/src/autograd/gradient.bend as Gradient
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
120def accumulate(+shape: Shape.Shape, slot: Slot, contribution: Core.Dynamic) -> Outcome:
121 Core.Packed{+contribution_shape, tensor} = contribution
122 checked(shape, slot, contribution_shape, tensor,
123 Layout.words_same(Shape.dimensions(contribution_shape), Shape.dimensions(shape)))