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/sovereign-intelligence/blob/main/tools/adapter/dq8.om.in # sovereign-intelligence Front door to Drake Stapleton's sovereign stack. 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 `sovereign-intelligence / tools / adapter / dq8.om.in` 28 lines ยท 705 bytes Raw Blame History 1 note dq8_@B@: q8_0 dot over @B@ blocks of 34 bytes (f16 scale d, 32 signed bytes q) against f32 x: 2 note acc (f64 bits) + sum over blocks of f64(d * sum_j f32(q_j)*x_j); fin 1 returns the f32 total. 3 fn q8s u uchar to f32 4 q = long u 5 if ge q 128 6 q = sub q 256 7 end 8 ret f32 q 9 end 10 fn q8d w view uchar @W@ o ulong to f32 11 ret h2f ushort or ulong get w o shl ulong get w add o 1 8 12 end 13 fn dq8_@B@ acc ulong w view uchar @W@ x view f32 @X@ fin ulong to ulong 14 s = bitcast f64 acc 15 for b ulong @B@ 16 o = mul b 34 17 xo = mul b 32 18 bs = f32 0.0 19 for j ulong 32 20 bs = add bs mul q8s get w add add o 2 j get x add xo j 21 end 22 s = add s f64 mul q8d view w o bs 23 end 24 if eq fin 1 25 ret ulong bitcast uint f32 s 26 end 27 ret bitcast ulong s 28 end