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 / tests / native_observer_run.om

55 lines · 1394 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note HOST_ONLY real cmdlist projection oracle; no GPU, admission or qualification claim.
3note Compose locked MC dependencies, canonical moe-closure.om, cases.om, then this file.
4note stdin exactly: frozen independent C SHA256 root32, meta32 LE64, submit16 LE64,
5note actual owner bank1024, actual owner QMD slot1024. No header or trailing bytes.
6note Expected preimage is frozen before mutation; observed bytes come from same-list post-add state.
7text NOPass "NATIVE_OBSERVER HOST_ONLY PASS\n"
8fn no_word b view uchar 2464 off ulong to ulong
9v = ulong 0
10for j ulong 8
11v = or v shl ulong get b add off j mul j 8
12end
13ret v
14end
15fn main to int
16wire = new uchar 2464 0
17want = new uchar 32 0
18m = new ulong 32 0
19s = new ulong 16 0
20bank = new uchar 1024 0
21qmd = new uchar 1024 0
22extra = new uchar 1 0
23pos = ulong 0
24while lt pos 2464 bound 2464
25n = read 0 wire pos sub ulong 2464 pos
26if le n 0
27ret 30
28end
29pos = add pos ulong n
30end
31n = read 0 extra 0 1
32if ne n 0
33ret 31
34end
35for i ulong 32
36put want i get wire i
37put m i no_word wire add 32 mul i 8
38end
39for i ulong 16
40put s i no_word wire add 288 mul i 8
41end
42for i ulong 1024
43put bank i get wire add 416 i
44put qmd i get wire add 1440 i
45end
46rc = no_cases edit m edit bank edit qmd edit s want
47if ne rc 0
48ret int rc
49end
50n = write 1 NOPass 0 len NOPass
51if ne n long len NOPass
52ret 32
53end
54ret 0
55end