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/host-trace/batch-device.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 / host-trace / batch-device.om` 40 lines · 952 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Parse actual DMA packet WFI release markers. Host model, NOT GPU execution. 3 fn bfdev m long off ulong words uint to bool 4 mark = mapaddr get gbmem 3 5 pos = off 6 last = add off mul ulong words 4 7 head = or uint `536870912` shl uint 5 16 8 head = or head shr uint 92 2 9 while le add pos 24 last 10 w = mapget m pos 4 11 if eq w ulong head 12 va = or mapget m add pos 4 4 shl mapget m add pos 8 4 32 13 val = mapget m add pos 12 4 14 if and ge va mark lt va add mark 4096 15 rel = sub va mark 16 if ge rel 32 17 note A launch seal must be WFI, followed by the canonical full shader invalidation. 18 if ne mapget m add pos 20 4 `1048577` 19 put nverr 0 -22 20 ret false 21 end 22 if ne mapget m add pos 28 4 4113 23 put nverr 0 -22 24 ret false 25 end 26 idx = add div sub rel 32 4 1 27 if eq idx get bffail 0 28 ret true 29 end 30 end 31 r = mapset get gbmem 3 rel 4 val 32 end 33 pos = add pos 24 34 else 35 pos = add pos 4 36 end 37 end 38 r = mapset get gbmem 2 8192 4 6 39 ret true 40 end