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
CUDApp / om / pipeline / consume.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Actual graph admission caller for Main's existing graph/command-list owner. |
| 3 | note Must be invoked under existing session lock with trusted immutable bundle. |
| 4 | note The selected canonical real comes from the owner's qualified registry. |
| 5 | fn pl_checkrow a view ulong 1024 want view uchar 4096 real view uchar 4096 sel view ulong 16 to int |
| 6 | row = new ulong 64 0 |
| 7 | base = mul get sel 1 64 |
| 8 | for j ulong 64 |
| 9 | put row j get a add base j |
| 10 | end |
| 11 | ret pl_realcheck want real row |
| 12 | end |
| 13 | fn pl_finish q view ulong 64 a view ulong 1024 p edit ulong 528 sel edit ulong 16 out edit ulong 32 to int |
| 14 | lease = new ulong 16 0 |
| 15 | rc = pl_selected q a p sel lease |
| 16 | if ne rc 0 |
| 17 | ret rc |
| 18 | end |
| 19 | for j ulong 16 |
| 20 | put out j get sel j |
| 21 | put out add j 16 get lease j |
| 22 | end |
| 23 | ret 0 |
| 24 | end |
| 25 | fn pl_graph q view ulong 64 a view ulong 1024 p edit ulong 528 want view uchar 4096 real view uchar 4096 out edit ulong 32 to int |
| 26 | sel = new ulong 16 0 |
| 27 | for j ulong 32 |
| 28 | put out j 0 |
| 29 | end |
| 30 | rc = pl_select q a sel |
| 31 | if ne rc 0 |
| 32 | ret rc |
| 33 | end |
| 34 | rc = pl_checkrow a want real sel |
| 35 | if ne rc 0 |
| 36 | ret rc |
| 37 | end |
| 38 | ret pl_finish q a p sel out |
| 39 | end |