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
CUDApp / om / apiviews / no_avbf.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Freestanding scalar ABI for bf16.om. Float bit transport stays in C; |
| 3 | note both NaN policies and round-to-nearest-even are seeded Omega. |
| 4 | note Keep equivalent to canonical av_rne/av_stbf; no_avbf is the sole export. |
| 5 | fn na_rne u uint to uint |
| 6 | a = and u 2139095040 |
| 7 | if eq a 2139095040 |
| 8 | if ne and u 8388607 0 |
| 9 | ret or shr u 16 64 |
| 10 | end |
| 11 | ret shr u 16 |
| 12 | end |
| 13 | ret shr add add u 32767 and shr u 16 1 16 |
| 14 | end |
| 15 | fn na_stbf u uint to uint |
| 16 | if gt and u 2147483647 2139095040 |
| 17 | ret 32704 |
| 18 | end |
| 19 | ret shr add add u 32767 and shr u 16 1 16 |
| 20 | end |
| 21 | fn no_avbf md ulong raw ulong to ulong |
| 22 | u = uint raw |
| 23 | if eq md 0 |
| 24 | ret ulong and na_rne u 65535 |
| 25 | end |
| 26 | ret ulong and na_stbf u 65535 |
| 27 | end |