Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-bridge/blob/main/pytorch/kernels/mm.om # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-bridge / pytorch / kernels / mm.om` 20 lines ยท 510 bytes Raw Blame History 1 note mm: o[M,N] = a[M,K] @ b[K,N] (aten.mm), row-major f32. Each dot product is summed in f64 and 2 note rounded once to f32. The caller supplies const lines M K N MK KN MN before this text. 3 fn mmdot a view f32 MK b view f32 KN i ulong j ulong to f64 4 s = 0.0f64 5 ia = mul i K 6 rb = j 7 for k ulong K 8 s = add s mul f64 get a ia f64 get b rb 9 ia = add ia 1 10 rb = add rb N 11 end 12 ret s 13 end 14 fn mm a view f32 MK b view f32 KN o edit f32 MN to void 15 for i ulong M 16 for j ulong N 17 put o add mul i N j f32 mmdot a b i j 18 end 19 end 20 end