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 / tests / components / compose-unit.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Actual root caller, not a generator-only substitute. |
| 3 | fn ut_compose cfg view ulong 16 to uint |
| 4 | ins = new ulong 8192 0 |
| 5 | m = new ulong 2048 0 |
| 6 | p = new ulong 288 0 |
| 7 | out = new ulong 8 0 |
| 8 | rc = bc_compose cfg ins m p out |
| 9 | if ne rc 0 |
| 10 | ret rc |
| 11 | end |
| 12 | if or eq get out 0 0 eq get out 1 0 |
| 13 | ret 99 |
| 14 | end |
| 15 | ret 0 |
| 16 | end |
| 17 | fn main to int |
| 18 | cfg = new ulong 16 0 |
| 19 | put cfg 0 1 |
| 20 | put cfg 1 256 |
| 21 | put cfg 2 8 |
| 22 | put cfg 3 1 |
| 23 | put cfg 4 4 |
| 24 | if ne ut_compose cfg 0 |
| 25 | ret 1 |
| 26 | end |
| 27 | put cfg 5 1 |
| 28 | if ne ut_compose cfg 0 |
| 29 | ret 2 |
| 30 | end |
| 31 | put cfg 0 2 |
| 32 | put cfg 5 0 |
| 33 | if ne ut_compose cfg 0 |
| 34 | ret 3 |
| 35 | end |
| 36 | put cfg 0 3 |
| 37 | put cfg 1 2048 |
| 38 | put cfg 2 16 |
| 39 | put cfg 3 4 |
| 40 | put cfg 4 16 |
| 41 | if ne ut_compose cfg 0 |
| 42 | ret 4 |
| 43 | end |
| 44 | put cfg 5 1 |
| 45 | if ne ut_compose cfg 0 |
| 46 | ret 5 |
| 47 | end |
| 48 | put cfg 6 1 |
| 49 | if eq ut_compose cfg 0 |
| 50 | ret 6 |
| 51 | end |
| 52 | ret 0 |
| 53 | end |