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/CUDApp/blob/main/om/blackwell/cpuf16.om # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. 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 `CUDApp / om / blackwell / cpuf16.om` 35 lines · 755 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 fn bw_hdot a view ushort * b view ushort * r ulong sh ulong to f32 3 nn = and sh `4294967295` 4 kk = shr sh 32 5 ai = and mul div r nn kk `4294967295` 6 bi = rem r nn 7 sum = bitcast f32 uint 0 8 for p ulong `4294967295` 9 if ge p kk 10 ret sum 11 end 12 x = bitcast f32 uint bw_half ulong get a ai 13 y = bitcast f32 uint bw_half ulong get b bi 14 sum = add sum mul x y 15 ai = and add ai 1 `4294967295` 16 bi = and add bi nn `4294967295` 17 end 18 ret sum 19 end 20 fn bw_cpuf16 a view ushort * b view ushort * c edit f32 * to int 21 nn = bw_dim len a len b len c 22 if eq nn 0 23 ret -1 24 end 25 kk = div len b nn 26 sh = or shl kk 32 nn 27 for t ulong `18446744073709551615` 28 if ge t len c 29 ret 0 30 end 31 v = bw_hdot view a view b t sh 32 put c and t `4294967295` v 33 end 34 ret 0 35 end