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 / smi / capprobe.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note capprobe.om: does this omc admit a 55888-byte devcall (the utilization control's params)? |
| 3 | note Issues the NV_ESC_RM_CONTROL request 3223340586 on /dev/null, which is not a GPU device: |
| 4 | note the kernel answers ENOTTY (-25) when the call is made. An omc without the aien-dev/omega-mv#1042 |
| 5 | note bound traps 3 at the devcall instead (exit 103). Exit 0: the call was made and returned -25. |
| 6 | text cpnull "/dev/null" |
| 7 | global cphdr uchar 32 |
| 8 | global cpbuf uchar 55888 |
| 9 | |
| 10 | fn main to int |
| 11 | fd = fopen cpnull 0 len cpnull 524290 0 |
| 12 | if lt fd 0 |
| 13 | ret 1 |
| 14 | end |
| 15 | r = devcall int fd uint 3223340586 cphdr 0 32 cpbuf 0 55888 |
| 16 | c = fclose int fd |
| 17 | if ne r -25 |
| 18 | ret 2 |
| 19 | end |
| 20 | ret 0 |
| 21 | end |