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 / pipeline / policy.om

155 lines · 3200 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Synthetic policy controls only. Not GPU timing, qualification or activation.
3fn main to int
4q = new ulong 64 0
5a = new ulong 1024 0
6o = new ulong 16 0
7pl_fixture q a
8if ne pl_expect q a o 1 0
9ret 1
10end
11note Replay returns the identical artifact and bundle, no search or learned state.
12for j ulong 16
13if ne pl_expect q a o 1 0
14ret 2
15end
16end
17note Faster-but-wrong: semantic gate absent. Other qualified candidate remains.
18put a 65 30
19if ne pl_expect q a o 2 0
20ret 3
21end
22put a 129 30
23if ne pl_expect q a o 0 0
24ret 4
25end
26note Micro-fast/full-slow: retain incumbent despite diagnostic micro cost1.
27pl_fixture q a
28put a 67 105
29put a 73 105
30put a 131 101
31put a 137 101
32if ne pl_expect q a o 0 0
33ret 5
34end
35note Packing makes fast execution lose on complete cost.
36put a 68 100
37put a 73 1
38if ne pl_expect q a o 0 0
39ret 6
40end
41note Complete phase mask mandatory; zero is not unknown.
42pl_fixture q a
43put a 66 31
44put a 130 31
45if ne pl_expect q a o 0 0
46ret 7
47end
48note Every applicability limb invalidates candidate evidence: includes target,
49note layout/tails/alias/budget and compiler/encoder/spec through canonical adapter.
50for p ulong 24
51pl_fixture q a
52put a add 97 p 0
53put a add 161 p 0
54if ne pl_expect q a o 0 0
55ret 8
56end
57end
58note Generation/profile/buffer/lifecycle invalidation.
59for p ulong 4
60pl_fixture q a
61put a add 81 p 2
62put a add 145 p 2
63if ne pl_expect q a o 0 0
64ret 9
65end
66end
67note Each resource ceiling must admit both alternatives independently.
68for p ulong 4
69pl_fixture q a
70put a add 75 p 129
71put a add 139 p 129
72if ne pl_expect q a o 0 0
73ret 10
74end
75end
76note Unsupported family or target feature refuses; never inferred TMA/tcgen05.
77pl_fixture q a
78put a 64 4
79put a 143 2
80if ne pl_expect q a o 0 0
81ret 11
82end
83note Overflow and inconsistent full cost both reject.
84pl_fixture q a
85put a 68 18446744073709551615
86put a 69 1
87put a 132 100
88if ne pl_expect q a o 0 0
89ret 12
90end
91note Incumbent ties preserve incumbent even if alternatives occupy earlier IDs.
92pl_fixture q a
93put a 67 100
94put a 73 100
95put a 131 100
96put a 137 100
97put q 12 0
98if ne pl_expect q a o 0 0
99ret 13
100end
101note Minimum benefit belongs to reviewed policy, no embedded ratio.
102pl_fixture q a
103put q 12 100
104if ne pl_expect q a o 0 0
105ret 14
106end
107note Invalid incumbent cannot be called a qualified fallback.
108pl_fixture q a
109put a 1 0
110if ne pl_select q a o 69
111ret 15
112end
113for j ulong 16
114if ne get o j 0
115ret 16
116end
117end
118note Duplicate artifact identities refuse rather than depending on record order.
119pl_fixture q a
120for j ulong 4
121put a add 149 j get a add 85 j
122end
123if ne pl_select q a o 65
124ret 17
125end
126note Replacing incumbent invalidates every dependent receipt.
127pl_fixture q a
128put q 30 0
129if ne pl_select q a o 69
130ret 18
131end
132note Permuting candidate slots preserves exact selected artifact identity.
133pl_fixture q a
134tmp = new ulong 64 0
135for j ulong 64
136put tmp j get a add 64 j
137put a add 64 j get a add 128 j
138put a add 128 j get tmp j
139end
140if ne pl_expect q a o 2 0
141ret 19
142end
143note Changed resource or full-path time budget invalidates incumbent as well.
144pl_fixture q a
145put q 7 0
146if ne pl_select q a o 69
147ret 20
148end
149pl_fixture q a
150put q 13 1
151if ne pl_select q a o 69
152ret 21
153end
154ret 0
155end