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
CUDApp / tests / speculation / report-test.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | fn group n ulong to void |
| 3 | fixture |
| 4 | put pconfig 0 1024 |
| 5 | put pconfig 1 0 |
| 6 | put pconfig 2 1 |
| 7 | put pconfig 3 32 |
| 8 | put pconfig 4 0 |
| 9 | for i ulong 128 |
| 10 | put parmids i get sid rem i 32 |
| 11 | end |
| 12 | check eq pstart n 0 |
| 13 | end |
| 14 | fn trial ord ulong to void |
| 15 | for i ulong 56 |
| 16 | put pobs i 0 |
| 17 | end |
| 18 | put pobs 0 div ord 4 |
| 19 | arm = rem add ord div ord 4 4 |
| 20 | put pobs 1 arm |
| 21 | for i ulong 32 |
| 22 | put pobs add i 24 get parmids add mul arm 32 i |
| 23 | end |
| 24 | put pobs 2 1 |
| 25 | for i ulong 8 |
| 26 | put pobs add i 3 add i 1 |
| 27 | end |
| 28 | put pobs 11 64 |
| 29 | put pobs 12 1000 |
| 30 | put pobs 13 1010 |
| 31 | put pobs 14 1200 |
| 32 | if eq arm 3 |
| 33 | put pobs 14 1100 |
| 34 | end |
| 35 | put pobs 15 1000 |
| 36 | put pobs 16 1 |
| 37 | put pobs 17 1 |
| 38 | put pobs 18 1 |
| 39 | put pobs 20 7 |
| 40 | put pobs 22 ord |
| 41 | put pobs 23 1024 |
| 42 | end |
| 43 | fn green to void |
| 44 | group 8 |
| 45 | check eq pfinish 75 |
| 46 | for i ulong 32 |
| 47 | trial i |
| 48 | check eq padd 0 |
| 49 | end |
| 50 | check eq pfinish 0 |
| 51 | for a ulong 3 |
| 52 | check eq preport a 0 |
| 53 | check eq get summary 0 8 |
| 54 | check eq get summary 1 a |
| 55 | check eq get summary 2 2000000 |
| 56 | check eq get summary 3 2000000 |
| 57 | check eq get summary 4 2000000 |
| 58 | check eq get summary 5 100 |
| 59 | check eq get summary 6 100 |
| 60 | check eq get summary 7 10 |
| 61 | check eq get summary 8 10 |
| 62 | check eq get summary 9 1000 |
| 63 | check eq get summary 10 1 |
| 64 | check eq get summary 11 1 |
| 65 | end |
| 66 | check eq preport 3 65 |
| 67 | note Correctness mismatch poisons comparisons, even with explicit success flags. |
| 68 | put praw add prow 0 3 7 999 |
| 69 | check eq pfinish 69 |
| 70 | check eq preport 0 69 |
| 71 | end |
| 72 | fn small to void |
| 73 | group 5 |
| 74 | for i ulong 20 |
| 75 | trial i |
| 76 | check eq padd 0 |
| 77 | end |
| 78 | check eq preport 2 0 |
| 79 | check eq get summary 10 0 |
| 80 | check eq get summary 3 0 |
| 81 | check eq get summary 4 18446744073709551615 |
| 82 | check eq prank 5 0 |
| 83 | check eq prank 6 1 |
| 84 | check eq prank 8 1 |
| 85 | check eq prank 10 2 |
| 86 | end |
| 87 | fn outcomes to void |
| 88 | group 6 |
| 89 | for i ulong 24 |
| 90 | trial i |
| 91 | put pobs 14 1200 |
| 92 | check eq padd 0 |
| 93 | end |
| 94 | check eq preport 1 0 |
| 95 | check eq get summary 10 2 |
| 96 | group 6 |
| 97 | for i ulong 24 |
| 98 | trial i |
| 99 | if eq get pobs 1 3 |
| 100 | put pobs 14 1400 |
| 101 | end |
| 102 | check eq padd 0 |
| 103 | end |
| 104 | check eq preport 1 0 |
| 105 | check eq get summary 2 500000 |
| 106 | check eq get summary 10 3 |
| 107 | group 6 |
| 108 | for i ulong 24 |
| 109 | trial i |
| 110 | put pobs 11 1 |
| 111 | check eq padd 0 |
| 112 | end |
| 113 | check eq preport 1 0 |
| 114 | check eq get summary 10 0 |
| 115 | end |
| 116 | fn invalid to void |
| 117 | group 6 |
| 118 | trial 0 |
| 119 | put pobs 18 0 |
| 120 | check eq padd 75 |
| 121 | check eq get pstate 1 1 |
| 122 | check eq get praw 18 0 |
| 123 | check eq pfinish 75 |
| 124 | group 6 |
| 125 | trial 1 |
| 126 | check eq padd 65 |
| 127 | check eq pfinish 75 |
| 128 | group 6 |
| 129 | trial 0 |
| 130 | put pobs 13 999 |
| 131 | check eq padd 65 |
| 132 | group 6 |
| 133 | trial 0 |
| 134 | put pobs 14 1005 |
| 135 | check eq padd 65 |
| 136 | group 6 |
| 137 | trial 0 |
| 138 | put pobs 19 1 |
| 139 | check eq padd 75 |
| 140 | group 6 |
| 141 | trial 0 |
| 142 | put pobs 17 0 |
| 143 | check eq padd 69 |
| 144 | group 6 |
| 145 | trial 0 |
| 146 | put pobs 21 1 |
| 147 | check eq padd 69 |
| 148 | group 6 |
| 149 | trial 0 |
| 150 | put pobs 16 2 |
| 151 | check eq padd 65 |
| 152 | group 6 |
| 153 | trial 0 |
| 154 | put pobs 11 0 |
| 155 | check eq padd 65 |
| 156 | group 6 |
| 157 | trial 0 |
| 158 | put pobs 14 18446744073709551615 |
| 159 | check eq padd 65 |
| 160 | group 6 |
| 161 | trial 0 |
| 162 | put sid 7 999 |
| 163 | check eq padd 69 |
| 164 | group 6 |
| 165 | trial 0 |
| 166 | put pobs 24 999 |
| 167 | check eq padd 69 |
| 168 | group 6 |
| 169 | put parmids 12 999 |
| 170 | check eq pstart 6 0 |
| 171 | trial 0 |
| 172 | check eq padd 0 |
| 173 | group 6 |
| 174 | put parmids 44 999 |
| 175 | check eq pstart 6 69 |
| 176 | group 6 |
| 177 | put parmids 84 999 |
| 178 | check eq pstart 6 69 |
| 179 | group 6 |
| 180 | trial 0 |
| 181 | put pconfig 0 32768 |
| 182 | check eq padd 69 |
| 183 | group 6 |
| 184 | put pconfig 4 1 |
| 185 | check eq pstart 6 69 |
| 186 | check eq pstart 4 65 |
| 187 | check eq pstart 33 65 |
| 188 | end |
| 189 | fn main to int |
| 190 | green |
| 191 | small |
| 192 | outcomes |
| 193 | invalid |
| 194 | note Missing baseline identities must not make an unqualified base look comparable. |
| 195 | for a ulong 2 |
| 196 | for d ulong 8 |
| 197 | group 6 |
| 198 | for j ulong 4 |
| 199 | put parmids add add mul a 32 mul d 4 j 0 |
| 200 | end |
| 201 | check eq pstart 6 69 |
| 202 | end |
| 203 | end |
| 204 | ret finish |
| 205 | end |