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 / fp8am.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Absolute max of one bf16 row, window 128. The sign bit is cleared before |
| 3 | note the widen, matching the quantize scan. A non-finite value (not <= 3.0e38f) |
| 4 | note returns 2 and does not commit this row. 3.0e38f bits 2137108966. |
| 5 | note WolframLanguageEvaluator: FromDigits of the Real32 bit list of 3.0*^38 -> 2137108966. |
| 6 | fn av_fp8am n ulong w view ushort 128 acc edit f32 1 to ulong |
| 7 | if gt n 128 |
| 8 | ret 1 |
| 9 | end |
| 10 | a = get acc 0 |
| 11 | for i ulong 128 |
| 12 | if lt i n |
| 13 | u = shl and uint get w i 32767 16 |
| 14 | f = bitcast f32 u |
| 15 | if not le f bitcast f32 uint 2137108966 |
| 16 | ret 2 |
| 17 | end |
| 18 | if gt f a |
| 19 | a = f |
| 20 | end |
| 21 | end |
| 22 | end |
| 23 | put acc 0 a |
| 24 | ret 0 |
| 25 | end |