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 / speculation / vector-checks-test.om

51 lines · 1132 bytes Raw Blame History
1note CPU-only regression at the seeded dynamic-loop limit, no device opens.
2global gbmem long 8
3global gbmax uint 1
4text ok "VECTOR_CHECKS_HOST_PASS\n"
5fn ck yes bool to void
6if not yes
7exit int 80
8end
9end
10fn supply i ulong to void
11ck eq mapget get gbmem 5 mul i 4 4 aval i 257
12ck eq mapget get gbmem 6 mul i 4 4 bval i 257
13ck eq mapget get gbmem 7 mul i 4 4 xor expect i 257 4294967295
14r = mapset get gbmem 7 mul i 4 4 expect i 257
15end
16fn run n uint to void
17put gbmax 0 add n 64
18for i ulong 3
19m = mapnew neg int 1 0 mul ulong get gbmax 0 4 3 34
20ck gt m 0
21put gbmem add i 5 m
22end
23prepare n 257
24note Check every prepared input and poison value, then supply the expected result.
25base = ulong 0
26while lt base ulong n
27count = sub ulong n base
28if gt count 65536
29count = ulong 65536
30end
31for j ulong count
32supply add base j
33end
34base = add base count
35end
36verify n 257 false
37r = mapset get gbmem 7 mul sub ulong n 1 4 4 xor expect sub ulong n 1 257 1
38verify n 257 true
39for i ulong 3
40ck eq mapdrop get gbmem add i 5 0
41end
42end
43fn main to int
44run 1
45run 999999
46run 1000000
47run 1000001
48run 1048576
49ck eq write 1 ok 0 len ok long len ok
50ret 0
51end