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 / tools / c5 / runtime.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Bridge root for the production session. Scalar-only, no allocation or host dependencies. |
| 3 | note op 0 absolute ns deadline from start and timeout milliseconds; zero refuses overflow. |
| 4 | note op 1 watch; op 2 one-ms poll if it fits (session poll cap is one ms). |
| 5 | note op 3 recovery admission; op 4 bundled RM-close acknowledgement through teardown states. |
| 6 | fn native_c5 op ulong a ulong b ulong c ulong d ulong e ulong to ulong |
| 7 | if eq op 0 |
| 8 | if gt b 18446744073709 |
| 9 | ret 0 |
| 10 | end |
| 11 | ret omega_c5_deadline a mul b 1000000 |
| 12 | end |
| 13 | if eq op 1 |
| 14 | ret ulong omega_c5_watch a b c ne d 0 ne e 0 |
| 15 | end |
| 16 | if eq op 2 |
| 17 | if ge a b |
| 18 | ret 0 |
| 19 | end |
| 20 | if and ne c 0 ge sub b a 1000000 |
| 21 | ret 1 |
| 22 | end |
| 23 | ret 0 |
| 24 | end |
| 25 | if eq op 3 |
| 26 | if and ne a 0 and ne b 0 ne c 0 |
| 27 | ret 1 |
| 28 | end |
| 29 | ret 0 |
| 30 | end |
| 31 | if eq op 4 |
| 32 | state = omega_c5_recover LATCH ne a 0 |
| 33 | state = omega_c5_recover state ne a 0 |
| 34 | state = omega_c5_recover state ne a 0 |
| 35 | ret ulong omega_c5_recover state ne a 0 |
| 36 | end |
| 37 | ret 0 |
| 38 | end |