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 / native / learn53 / omega-adapter.om

86 lines · 1646 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Compose with exact omega653.lock core. No fork, runner, signer or cost collector.
3note LT/LPin/LC/status/exit are trusted executor inputs, not candidate claims.
4fn aword p ulong v ulong to void
5for i ulong 4
6put LWant add mul p 4 i uchar and shr v mul i 8 255
7end
8end
9fn aobserve id ulong status ulong code ulong n ulong to ulong
10tn = kload id
11if eq tn 0
12ret 10
13end
14if ne kvalid tn 0
15ret 10
16end
17for i ulong 256
18put LWant i 0
19end
20aword 0 2779096485
21for i ulong kw 13
22aword add i 1 kexpect i
23end
24aword add kw 13 1 2779096485
25want = mul 4 add kw 13 2
26ret lobserve status 0 code want n
27end
28fn afields to bool
29for i ulong 8
30a = mul i 32
31id = add i 1
32n = kload id
33if ne get LT a id
34ret false
35end
36if ne get LT add a 1 2
37ret false
38end
39if ne get LT add a 2 1
40ret false
41end
42if ne get LT add a 3 kw 2
43ret false
44end
45if ne get LT add a 4 1
46ret false
47end
48if ne get LT add a 5 1
49ret false
50end
51if ne get LT add a 6 53
52ret false
53end
54if ne get LT add a 7 1
55ret false
56end
57if ne get LT add a 28 n
58ret false
59end
60if ne get LT add a 29 mul 4 add kw 13 2
61ret false
62end
63if ne get LT add a 30 1000000
64ret false
65end
66if ne get LT add a 31 0
67ret false
68end
69end
70ret true
71end
72fn abegin budget ulong to ulong
73note Canonical active-run refusal preserves the existing run.
74if eq get LS 0 1
75ret 20
76end
77if eq afields false
78note Invalid count invokes canonical fresh-run invalidation, including stale scores.
79ret lbegin 0 1 budget
80end
81ret lbegin 8 1 budget
82end
83fn aattempt idx ulong ordinal ulong status ulong code ulong n ulong to ulong
84outcome = aobserve add idx 1 status code n
85ret lattempt idx ordinal outcome
86end