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 / device-trace / body-test.om

84 lines · 1300 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Compose after vector.om and trace-emit.om. Complete kernels are not body fragments.
3note Refusing EXIT must ignore its predicate: even an apparently inactive exit is unsupported.
4
5fn bsentinel to void
6for i ulong 8192
7put gbout i 165
8end
9put gboutlen 0 7
10end
11
12fn brefused on ulong to bool
13ok = gtewrap on 2
14if ok
15ret false
16end
17if ne get gterr 0 5
18ret false
19end
20if ne get gboutlen 0 7
21ret false
22end
23for i ulong 8192
24if ne get gbout i 165
25ret false
26end
27end
28ret true
29end
30
31fn ballflags to bool
32for i ulong 3
33on = add i 1
34if eq i 2
35on = ulong 18446744073709551615
36end
37bsentinel
38ok = brefused on
39if not ok
40ret false
41end
42end
43ret true
44end
45
46fn main to int
47put gtchecks 0 1
48gbvec
49for i ulong get gblen 0
50put gbin i get gbcode i
51end
52put gbinlen 0 get gblen 0
53ok = ballflags
54if not ok
55ret 1
56end
57note Disabled wrapping of an actual whole kernel remains byte-identical.
58ok = gtewrap 0 2
59if not ok
60ret 2
61end
62if ne get gboutlen 0 get gbinlen 0
63ret 3
64end
65for i ulong get gbinlen 0
66if ne get gbout i get gbin i
67ret 4
68end
69end
70note Every predicate field, including PT, P0 and inverted predicates.
71put gbinlen 0 16
72for p ulong 16
73for i ulong 16
74put gbin i 0
75end
76put gbin 0 77
77put gbin 1 uchar or 9 shl p 4
78ok = ballflags
79if not ok
80ret 5
81end
82end
83ret 0
84end