interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / om / apiviews / fp8am.om

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