def planned_shape

bendtorch-core@0.1.0.0 · src/tensor/batched_matmul.bend:131

import bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend as BatchedMatmul
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/matmul.bend as Matrix

131def planned_shape(+batch: List<&2, U32>, +rows: U32, +inner: U32, +columns: U32,
132  +l1: U32, +l2: U32, +r1: U32, +r2: U32, +o1: U32, +o2: U32, +lv: Bool, +rv: Bool,
133  -dims: List<&2, U32>, result: Shape.ConstructResult<dims>) -> Result<&2, &2, Matrix.Error, Plan>:
134  match result:
135    case Shape.SError{error}:
136      Fail{Matrix.ShapeError{error}}
137    case Shape.SBuilt{+shape, preserved}:
138      Done{Plan{shape, batch, U32.to_nat(rows), U32.to_nat(inner), U32.to_nat(columns),
139        U32.to_nat(l1), U32.to_nat(l2), U32.to_nat(r1), U32.to_nat(r2), U32.to_nat(o1), U32.to_nat(o2), lv, rv}}

Uses (8)

Used by (2)