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/learn53/moe-observe-fixtures.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 / learn53 / moe-observe-fixtures.om` 105 lines · 1794 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note HOST_ONLY SYNTHETIC hash-preimage fixtures; not actual GPU QMDs or hardware receipts. 3 fn mo_launch m edit ulong 32 s edit ulong 16 to void 4 put m 0 1 5 put m 1 159 6 put m 2 1 7 put m 3 2 8 put m 4 6 9 put m 5 16 10 put m 7 7 11 put m 10 `16777216` 12 put s 0 1 13 put s 1 159 14 put s 2 4 15 put s 3 7 16 put s 6 20000 17 put s 7 50 18 put s 11 1 19 end 20 fn mo_dir m edit ulong 8 r edit ulong 1024 to void 21 put m 0 1 22 put m 1 159 23 put m 2 2 24 put m 4 257 25 put m 5 11 26 for i ulong 514 27 put r i `16777216` 28 end 29 end 30 fn mo_alloc m edit ulong 8 r edit ulong 1024 to void 31 put m 0 1 32 put m 1 159 33 put m 2 3 34 put m 3 2 35 put m 4 5 36 put m 5 11 37 put m 6 7 38 for i ulong 2 39 p = mul i 16 40 put r p i 41 put r add p 2 1 42 put r add p 3 2 43 put r add p 4 `16777216` 44 put r add p 5 4096 45 put r add p 6 add ulong `16777216` mul i 8 46 put r add p 7 sub ulong 4096 mul i 8 47 put r add p 8 5 48 end 49 end 50 fn mo_equal a view uchar 32 b view uchar 32 to bool 51 for i ulong 32 52 if ne get a i get b i 53 ret false 54 end 55 end 56 ret true 57 end 58 fn mo_zero a view uchar 32 to bool 59 for i ulong 32 60 if ne get a i 0 61 ret false 62 end 63 end 64 ret true 65 end 66 fn mo_qmd m view ulong 32 q edit uchar 1024 to void 67 low = shr get m 10 4 68 high = or shr get m 10 36 shl ulong 10 21 69 for i ulong 4 70 put q add 128 i uchar and shr low mul i 8 255 71 put q add 132 i uchar and shr high mul i 8 255 72 end 73 end 74 fn mo_flip b edit uchar 1024 i ulong to void 75 put b i xor get b i 1 76 end 77 fn ms_fill m edit ulong 8 hashes edit uchar 4096 ord edit ulong 128 n ulong kind ulong to void 78 for i ulong 8 79 put m i 0 80 end 81 for i ulong 4096 82 put hashes i 0 83 end 84 for i ulong 128 85 put ord i 0 86 end 87 put m 0 1 88 put m 1 159 89 put m 2 5 90 put m 3 1 91 put m 4 kind 92 put m 5 n 93 if eq kind 1 94 put m 6 7 95 put m 7 4096 96 end 97 for i ulong 128 98 if lt i n 99 put hashes mul i 32 uchar add i 1 100 if eq kind 1 101 put ord i add ulong 3968 i 102 end 103 end 104 end 105 end