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 / widen.om
| 1 | om2 |
| 2 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | note bf16 to f32, exact widen (shift left 16), over the live view. |
| 4 | fn av_widen x view ushort * y edit f32 * to ulong |
| 5 | if ne len x len y |
| 6 | ret 1 |
| 7 | end |
| 8 | for i ulong len x |
| 9 | u = uint get x i |
| 10 | put y i bitcast f32 shl u 16 |
| 11 | end |
| 12 | ret 0 |
| 13 | end |