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 / models / mxdot-capacity.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Full-width dimensions reach the real library entry, unlike the byte-sized wire fixture. |
| 3 | note Input is one scenario byte. Refused scenarios must exit with trap 5. |
| 4 | fn main to int |
| 5 | mode = new uchar 1 0 |
| 6 | if ne read 0 mode 0 1 1 |
| 7 | ret 1 |
| 8 | end |
| 9 | a = new uchar 4096 0 |
| 10 | b = new uchar 4096 0 |
| 11 | sa = new uchar 256 0 |
| 12 | sb = new uchar 256 0 |
| 13 | c = new f64 256 1.0f64 |
| 14 | d = new ulong 4 0 |
| 15 | put d 1 16 |
| 16 | put d 2 16 |
| 17 | put d 3 16 |
| 18 | if eq get mode 0 1 |
| 19 | put d 1 9223372036854775808 |
| 20 | put d 2 2 |
| 21 | put d 3 32 |
| 22 | end |
| 23 | if eq get mode 0 2 |
| 24 | put d 1 0 |
| 25 | put d 2 9223372036854775808 |
| 26 | put d 3 32 |
| 27 | end |
| 28 | if eq get mode 0 3 |
| 29 | put d 1 9223372036854775808 |
| 30 | put d 2 0 |
| 31 | put d 3 32 |
| 32 | end |
| 33 | if eq get mode 0 4 |
| 34 | put d 1 0 |
| 35 | put d 2 1 |
| 36 | end |
| 37 | if eq get mode 0 5 |
| 38 | put d 1 1 |
| 39 | put d 2 0 |
| 40 | end |
| 41 | if eq get mode 0 6 |
| 42 | put d 1 17 |
| 43 | end |
| 44 | if eq get mode 0 7 |
| 45 | put d 1 129 |
| 46 | put d 2 0 |
| 47 | put d 3 32 |
| 48 | end |
| 49 | if eq get mode 0 8 |
| 50 | put d 0 2 |
| 51 | put d 1 1 |
| 52 | put d 2 0 |
| 53 | put d 3 8192 |
| 54 | end |
| 55 | mxmm a sa b sb c d |
| 56 | if eq get mode 0 0 |
| 57 | for i ulong 256 |
| 58 | if ne get c i 0.0f64 |
| 59 | ret 2 |
| 60 | end |
| 61 | end |
| 62 | end |
| 63 | if or eq get mode 0 4 eq get mode 0 5 |
| 64 | if ne get c 0 1.0f64 |
| 65 | ret 3 |
| 66 | end |
| 67 | end |
| 68 | ret 0 |
| 69 | end |