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/numeric/no_bf16.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 / numeric / no_bf16.om` 14 lines · 461 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Integer-only freestanding binary32 to bf16 RNE; preserve quiet NaN payload. 3 note WolframLanguageEvaluator: FromDigits[#,16]& /@ {"`7f800000`","`007fffff`","0040","7fff"} 4 note -> {`2139095040`,`8388607`,64,32767}. 5 fn no_bf16 raw ulong to ulong 6 u = uint raw 7 if eq and u `2139095040` `2139095040` 8 if ne and u `8388607` 0 9 ret ulong or shr u 16 64 10 end 11 end 12 u = add add u 32767 and shr u 16 1 13 ret ulong shr u 16 14 end