NLA-lib Explorer

NLAlib.Ops.Examples.runs_gemm_rounded

Library · theorem

Relative-error BLAS

The abstract theorem of gemm, from its certificate by the bridge: for every interpretation meeting the level-1 contracts at ε for the length n, the run terminates within m p calls of dot and the workspace of one, and the computed product satisfies the componentwise forward bound with ε.dot n.

NLAlib.Ops.Examples.runs_gemm_rounded {K Op Tst : Type} [Ops.Has Ops.Blas1Op Op] [Inhabited K]
  {dec : K → ℝ} {ε : Ops.Blas1Err} {ok : ℕ → Prop} {J : Ops.Interp Op Tst K}
  (hJ : Ops.IsBlas1 dec ε ok J) (W : Op → List ℕ → ℕ) {τ : Ops.Tape K} {m n p : ℕ} {A B C : ℕ × ℕ}
  {μ : Ops.Mem K} {as bs : List K} (hok : ok n) (hAC : A.1 ≠ C.1) (hBC : B.1 ≠ C.1)
  (hl : μ.Live [A, B, C]) (hA : μ.store.readBlock A.1 A.2 (m * n) = some as)
  (hB : μ.store.readBlock B.1 B.2 (p * n) = some bs) (hC : C.2 + m * p ≤ μ.store.len C.1) :
  Ops.ConditionalRuns J W τ Ops.Examples.gemm (Ops.Env.frame [m, n, p] [A, B, C]) μ
    (Ops.Examples.gemmCount m n p) (W (Ops.Has.inj Ops.Blas1Op.dot) [n])
    (Ops.Examples.GemmRounded dec (ε.dot n) m n p C as bs μ)

Full source on GitHub

Import NLAlib.Ops.Examples.Gemm.