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/om/codegen/cg_replay.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 / om / codegen / cg_replay.om` 64 lines · 1170 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Replay wire admission. maxop is the final opcode of the pinned public enum; no new IR op is introduced. 3 fn validreg v ulong lim ulong to bool 4 ret or eq v `18446744073709551615` lt v lim 5 end 6 fn cg_replay ins view ulong 8192 meta view ulong 512 maxop ulong to ulong 7 n = get meta 0 8 if or eq n 0 gt n 1024 9 ret 4 10 end 11 if or gt get meta 1 256 gt get meta 2 32 12 ret 4 13 end 14 if gt get meta 5 24 15 ret 4 16 end 17 lim = get meta 6 18 if and ne lim 0 or le lim 128 gt lim 246 19 ret 4 20 end 21 if gt get meta 7 1 22 ret 9 23 end 24 if and eq get meta 7 1 gt get meta 1 160 25 ret 10 26 end 27 for v ulong get meta 1 28 k = get meta add 64 v 29 if and ne k 1 and ne k 2 ne k 4 30 ret 4 31 end 32 end 33 for u ulong get meta 2 34 k = get meta add 320 u 35 if and ne k 1 ne k 2 36 ret 4 37 end 38 end 39 for i ulong n 40 b = mul i 8 41 if gt get ins b maxop 42 ret 4 43 end 44 for off ulong 4 45 f = add off 1 46 if not validreg get ins add b f 256 47 ret 4 48 end 49 end 50 if not validreg get ins add b 5 32 51 ret 4 52 end 53 end 54 note Closures must occur in emitter order, as the C replay dispatch consumes them. 55 last = ulong 0 56 for l ulong get meta 5 57 e = get meta add 17 mul l 2 58 if or ge e n lt e last 59 ret 4 60 end 61 last = e 62 end 63 ret 0 64 end