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/graph/pf_order.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 / graph / pf_order.om` 118 lines · 1589 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Prefill mixer shares batch descriptor roles. Every token/recurrence dependency is selected here, never by the executor. 3 fn gr_pord c view ulong 16 v view ulong 64 p ulong to ulong 4 n = get v 30 5 tail = add ulong 4 mul n 3 6 multi = get c 3 7 if or eq get c 5 1 eq get c 5 3 8 multi = 0 9 end 10 if ne get c 2 0 11 tail = add ulong 8 mul n 2 12 else 13 if ne multi 0 14 tail = 6 15 end 16 end 17 if lt p 4 18 if eq p 0 19 if ne get c 1 0 20 ret shl ulong 20 32 21 end 22 ret 0 23 end 24 if eq p 1 25 ret shl ulong 21 32 26 end 27 if eq p 2 28 if eq get c 2 0 29 ret shl ulong 22 32 30 end 31 ret 0 32 end 33 ret shl ulong 23 32 34 end 35 if lt p tail 36 if eq get c 2 0 37 if ne multi 0 38 if eq p 4 39 ret shl ulong 42 32 40 end 41 ret shl ulong 41 32 42 end 43 j = sub p 4 44 t = div j 3 45 if eq get c 5 1 46 if ge n 2 47 if ge add t 2 n 48 if eq add t 2 n 49 t = sub n 1 50 else 51 t = sub n 2 52 end 53 end 54 end 55 end 56 if eq rem j 3 0 57 ret or shl ulong 24 32 t 58 end 59 if eq rem j 3 1 60 if eq get c 5 3 61 if lt add t 1 n 62 ret 0 63 end 64 end 65 ret or shl ulong 25 32 t 66 end 67 if eq get c 5 3 68 if gt t 0 69 ret or shl ulong 43 32 sub t 1 70 end 71 end 72 ret 0 73 end 74 if eq p 4 75 ret shl ulong 26 32 76 end 77 if eq p 5 78 if ne get c 4 0 79 ret shl ulong 44 32 80 end 81 ret 0 82 end 83 if eq add p 1 tail 84 ret shl ulong 41 32 85 end 86 if eq add p 2 tail 87 if ne get c 4 0 88 if ne get c 9 3 89 ret shl ulong 45 32 90 end 91 end 92 ret 0 93 end 94 j = sub p 6 95 t = div j 2 96 if ne get c 4 0 97 if ne get c 9 3 98 ret 0 99 end 100 if eq rem j 2 0 101 ret 0 102 end 103 end 104 ret or shl add ulong 27 rem j 2 32 t 105 end 106 j = sub p tail 107 if eq j 0 108 ret shl ulong 30 32 109 end 110 if eq j 1 111 ret shl ulong 31 32 112 end 113 j = mul sub j 2 get v 62 114 if ge j n 115 ret shl ulong 255 32 116 end 117 ret or shl ulong 32 32 j 118 end