def new_spec

bendtorch-core@0.1.0.0 · src/tensor/contracts/matmul_parallel_proof.bend:260

import bendtorch-core@0.1.0.0/src/tensor/contracts/matmul_parallel_proof.bend as MatmulParallelProof
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/model.bend as Model
import bendtorch-core@0.1.0.0/src/storage/LAWS.bend as StorageLaws

260def new_spec(+span: Nat, +columns: Nat, +left: Shape.Shape, +left_fill: F32, +left_ops: List<&2, StorageLaws.Op>, +right: Shape.Shape, +right_fill: F32, +right_ops: List<&2, StorageLaws.Op>, +depth: Nat, +base: Nat) -> {Array.new(F32, depth, 0.0) == out_spec(span, columns, left, left_fill, left_ops, right, right_fill, right_ops, 0n, depth, base) : Array<F32>}:
261  match depth:
262    case 0n:
263      %Equal.sym(Bool, Nat.is_lt(base, 0n), False{}, lt_zero_false(base)) :
264        {ALeaf{0.0} == ALeaf{out_leaf(span, columns, left, left_fill, left_ops, right, right_fill, right_ops, base, _)} : Array<F32>}
265      {==}
266    case 1n+inner:
267      %Equal.sym(Array<F32>, Array.new(F32, inner, 0.0), out_spec(span, columns, left, left_fill, left_ops, right, right_fill, right_ops, 0n, inner, base), new_spec(span, columns, left, left_fill, left_ops, right, right_fill, right_ops, inner, base)) :
268        {ANode{_, Array.new(F32, inner, 0.0)} == out_spec(span, columns, left, left_fill, left_ops, right, right_fill, right_ops, 0n, 1n+inner, base) : Array<F32>}
269      %Equal.sym(Array<F32>, Array.new(F32, inner, 0.0), out_spec(span, columns, left, left_fill, left_ops, right, right_fill, right_ops, 0n, inner, Nat.add(Model.capacity(inner), base)),
270        new_spec(span, columns, left, left_fill, left_ops, right, right_fill, right_ops, inner, Nat.add(Model.capacity(inner), base))) :
271        {ANode{out_spec(span, columns, left, left_fill, left_ops, right, right_fill, right_ops, 0n, inner, base), _} == out_spec(span, columns, left, left_fill, left_ops, right, right_fill, right_ops, 0n, 1n+inner, base) : Array<F32>}
272      {==}

Uses (15)

Used by (1)