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 / tools / c5 / runtime.om

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