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