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

239 lines · 5052 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2fn flat to void
3fixture
4put scontrol 0 0
5put scontrol 1 0
6check eq sselect 1000 256 1000 7 2 0 0
7check eq get decision 0 31
8check eq get decision 1 32
9check eq get decision 2 32000000
10check eq get decision 3 101
11put scontrol 0 0
12put scontrol 1 0
13check eq sselect 1000 256 1000 7 2 0 75
14check eq sobserve 31 32 101 0 1 0
15check eq get sstate 6 32
16check eq get sstate 7 31
17check eq get sstate 8 1
18put scontrol 0 0
19put scontrol 1 0
20check eq sselect 1031 224 1000 7 2 0 75
21check eq sresume 0
22put scontrol 0 0
23put scontrol 1 0
24check eq sselect 1032 224 1000 7 2 0 0
25scancel
26end
27fn stepped to void
28fixture
29put srows 70 1000
30put srows 59 1000
31put scontrol 0 0
32put scontrol 1 0
33check eq sselect 1000 256 1000 7 2 0 0
34check eq get decision 0 8
35scancel
36fixture
37for i ulong 31
38put sprior i 0
39end
40check eq sbegin 0 0
41put scontrol 0 0
42put scontrol 1 0
43check eq sselect 1000 256 1000 7 2 0 0
44check eq get decision 0 0
45scancel
46fixture
47note Exact tie: ordinary expected1/cost101 and k1 expected2/cost202.
48for r ulong 7
49put srows add mul r 11 4 sub mul add slen r 1 101 1
50end
51put scontrol 0 0
52put scontrol 1 0
53check eq sselect 1000 256 1000 7 2 0 0
54check eq get decision 0 0
55scancel
56end
57fn bounds to void
58fixture
59put scontrol 0 0
60put scontrol 1 0
61check eq sselect 1000 3 1000 7 2 0 0
62check eq get decision 0 2
63scancel
64fixture
65put scontrol 0 0
66put scontrol 1 0
67check eq sselect 1000 256 130 7 2 0 0
68check eq get decision 0 4
69scancel
70fixture
71put scontrol 0 0
72put scontrol 1 0
73check eq sselect 32999 256 1000 7 2 0 0
74check eq get decision 0 0
75scancel
76check eq sselect 1000 256 1000 7 2 0 75
77check eq sbegin 0 0
78put scontrol 0 0
79put scontrol 1 0
80check eq sselect 33000 256 1000 7 2 0 69
81put scontrol 0 0
82put scontrol 1 0
83check eq sselect 999 256 1000 7 2 0 69
84put scontrol 0 0
85put scontrol 1 0
86check eq sselect 1000 256 99 7 2 0 77
87put scontrol 0 0
88put scontrol 1 0
89check eq sselect 1000 0 1000 7 2 0 65
90put scontrol 0 0
91put scontrol 1 0
92check eq sselect 1000 257 1000 7 2 0 65
93put scontrol 0 0
94put scontrol 1 0
95check eq sselect 1000 256 1000 8 2 0 69
96put scontrol 0 1
97put scontrol 1 0
98check eq sselect 1000 256 1000 7 2 0 69
99put scontrol 0 0
100put scontrol 1 1
101check eq sselect 1000 256 1000 7 2 0 0
102check eq get decision 0 0
103check eq get decision 4 2
104scancel
105fixture
106put scontrol 0 0
107put scontrol 1 0
108check eq sselect 1000 256 1000 7 1 8 0
109check eq get decision 0 8
110scancel
111check eq sbegin 0 0
112put scontrol 0 0
113put scontrol 1 0
114check eq sselect 1000 256 1000 7 1 3 77
115put scontrol 0 0
116put scontrol 1 0
117check eq sselect 1000 256 1000 7 3 0 65
118end
119fn invalid to void
120fixture
121put sid 31 999
122put scontrol 0 0
123put scontrol 1 0
124check eq sselect 1000 256 1000 7 2 0 69
125fixture
126put sprofile 0 2
127put scontrol 0 0
128put scontrol 1 0
129check eq sselect 1000 256 1000 7 2 0 69
130fixture
131put sprofile 5 2
132put scontrol 0 0
133put scontrol 1 0
134check eq sselect 1000 256 1000 7 2 0 77
135fixture
136put srows 68 31
137put scontrol 0 0
138put scontrol 1 0
139check eq sselect 1000 256 1000 7 2 0 65
140fixture
141put srows 4 0
142put scontrol 0 0
143put scontrol 1 0
144check eq sselect 1000 256 1000 7 2 0 65
145fixture
146put srows 4 18446744073709551615
147put scontrol 0 0
148put scontrol 1 0
149check eq sselect 1000 256 1000 7 2 0 65
150fixture
151put srows 10 4
152put scontrol 0 0
153put scontrol 1 0
154check eq sselect 1000 256 1000 7 2 0 65
155fixture
156put sprior 2 1000001
157check eq sbegin 0 65
158fixture
159put sprior 1 0
160check eq sbegin 0 65
161fixture
162put srows 66 0
163put scontrol 0 0
164put scontrol 1 0
165check eq sselect 1000 256 1000 7 2 0 0
166check eq get decision 0 16
167scancel
168fixture
169for i ulong 4
170put sid i 0
171put sid add i 32 0
172end
173put scontrol 0 0
174put scontrol 1 0
175check eq sselect 1000 256 1000 7 2 0 69
176end
177fn recovery to void
178fixture
179put scontrol 0 0
180put scontrol 1 0
181check eq sselect 1000 256 1000 7 2 0 0
182check eq sobserve 32 33 101 0 1 65
183check eq sobserve 31 32 101 0 0 75
184check eq get sstate 6 0
185check eq sobserve 31 32 0 0 1 65
186check eq sobserve 0 1 10000 0 1 0
187check eq get sstate 8 1
188check eq sresume 0
189note Every speculative row now has a measured loss; fallback until bounded probe.
190for r ulong 7
191if gt r 0
192put measured r 10000
193end
194end
195put scontrol 0 0
196put scontrol 1 0
197check eq sselect 1001 255 1000 7 2 0 0
198check eq get decision 0 0
199check eq get decision 4 3
200check eq sobserve 0 1 101 0 1 0
201check eq sresume 0
202put sstate 5 8
203put scontrol 0 0
204put scontrol 1 0
205check eq sselect 1002 254 1000 7 2 0 0
206check gt get decision 0 0
207check eq get decision 4 4
208check eq sobserve get decision 0 add get decision 0 1 101 0 1 0
209check eq sresume 0
210put scontrol 0 0
211put scontrol 1 0
212check eq sselect 1034 222 1000 7 2 0 0
213check gt get decision 0 0
214scancel
215fixture
216put scontrol 0 0
217put scontrol 1 0
218check eq sselect 1000 256 1000 7 2 0 0
219check eq sobserve 3 4 101 1 1 0
220check eq get sstate 9 1
221put scontrol 0 0
222put scontrol 1 0
223check eq sselect 1004 252 1000 7 2 0 75
224check eq sbegin 0 0
225check eq get sstate 6 0
226check eq get measured 6 0
227check eq get survive 3 1000000
228check eq sbegin 1 0
229put sprofile 1 8
230check eq sbegin 1 69
231end
232fn main to int
233flat
234stepped
235bounds
236invalid
237recovery
238ret finish
239end