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/addmm.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 / addmm.om` 21 lines ยท 609 bytes Raw Blame History 1 note addmm: o[M,N] = c[N] + a[M,K] @ b[K,N] (aten.addmm, beta 1, alpha 1, bias over rows), row-major 2 note f32. Each sum starts at the bias, is summed in f64 and rounded once to f32. 3 note The caller supplies const lines M K N MK KN MN before this text. 4 fn amdot c view f32 N a view f32 MK b view f32 KN i ulong j ulong to f64 5 s = f64 get c j 6 ia = mul i K 7 rb = j 8 for k ulong K 9 s = add s mul f64 get a ia f64 get b rb 10 ia = add ia 1 11 rb = add rb N 12 end 13 ret s 14 end 15 fn addmm c view f32 N a view f32 MK b view f32 KN o edit f32 MN to void 16 for i ulong M 17 for j ulong N 18 put o add mul i N j f32 amdot c a b i j 19 end 20 end 21 end