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/speculation/native-submit-test.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 / speculation / native-submit-test.om` 80 lines · 1820 bytes Raw Blame History 1 note Physical FIFO semaphore writes, including ring wrap and timeout latching. 2 note No SM kernel, model inference, performance claim or live-service replacement. 3 global diag uchar 24 4 text ok "NATIVE_DEVICE_SUBMIT_PASS\n" 5 text bad "NATIVE_DEVICE_SUBMIT_FAIL\n" 6 fn pack off ulong v long to void 7 for i ulong 8 8 put diag add off i uchar and shr v mul i 8 255 9 end 10 end 11 fn ck yes bool to void 12 if not yes 13 pack 0 long get nvstage 0 14 pack 8 get nverr 0 15 closed = nvstop 16 pack 16 long get nvfault 0 17 r = write 2 bad 0 len bad 18 r = write 1 diag 0 len diag 19 exit int 80 20 end 21 end 22 fn packet pb long sem long value uint to void 23 va = mapaddr sem 24 ck eq mapset sem 0 4 0 0 25 ck eq mapset pb 0 4 `537198615` 0 26 ck eq mapset pb 4 4 and va `4294967295` 0 27 ck eq mapset pb 8 4 shr va 32 0 28 ck eq mapset pb 12 4 ulong value 0 29 ck eq mapset pb 16 4 0 0 30 ck eq mapset pb 20 4 `1048577` 0 31 end 32 fn main to int 33 for attempt ulong 2 34 ck nvfull 35 ck nvchan 36 pb = nvalloc 4096 false 37 sem = nvalloc 4096 false 38 ck gt pb 0 39 ck gt sem 0 40 ck not nvsend pb 0 0 41 ck not nvsend pb 4096 6 42 ck not nvsend pb 1 6 43 ck eq get nvput 0 0 44 for i uint 1026 45 value = add i 1 46 packet pb sem value 47 ck eq mapget sem 0 4 0 48 ck nvsend pb 0 6 49 ck not nvsend pb 0 6 50 ck not nvdrop sem 51 ck eq get nverr 0 neg long 16 52 ck nvwait sem 0 value `2000000000` 53 ck eq mapget sem 0 4 ulong value 54 ck eq get nvput 0 get nvret 0 55 end 56 ck nvdrop sem 57 ck nvdrop pb 58 ck nvstop 59 ck eq get nvfault 0 0 60 end 61 note A deliberately wrong expected payload must time out and prevent further work. 62 ck nvfull 63 ck nvchan 64 pb = nvalloc 4096 false 65 sem = nvalloc 4096 false 66 ck gt pb 0 67 ck gt sem 0 68 packet pb sem 4096 69 ck nvsend pb 0 6 70 ck not nvwait sem 0 4097 `1000000` 71 ck eq get nverr 0 neg long 110 72 ck eq get nvfault 0 1 73 ck not nvsend pb 0 6 74 ck not nvdrop sem 75 ck nvstop 76 ck not nvstart 77 ck eq get nverr 0 neg long 5 78 ck eq write 1 ok 0 len ok long len ok 79 ret 0 80 end