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 / fp8xb.om
| 1 | om2 |
| 2 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | note Widen bf16 x and fold by 2^64. WolframLanguageEvaluator: bits32[2^64] -> 1602224128. |
| 4 | fn av_w16 u uint to f32 |
| 5 | ret bitcast f32 shl u 16 |
| 6 | end |
| 7 | fn av_fp8xb src view ushort * dst edit f32 * to ulong |
| 8 | if ne len src len dst |
| 9 | ret 1 |
| 10 | end |
| 11 | fold = bitcast f32 uint 1602224128 |
| 12 | for i ulong len src |
| 13 | u = uint get src i |
| 14 | put dst i mul av_w16 u fold |
| 15 | end |
| 16 | ret 0 |
| 17 | end |