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 / native / nvml / step.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note step.om: the exported nvml_step, after nvml.om and query.om. Ops in s 0: 1 nvmlInit_v2, |
| 3 | note 2 nvmlShutdown, 3 GetCount_v2, 4 GetHandleByIndex_v2, 5 GetName, 6 GetUUID, 7 GetTemperature, |
| 4 | note 8 GetMemoryInfo, 9 GetUtilizationRates, 10 GetComputeRunningProcesses_v3. A new call |
| 5 | note (resume point 0) clears the outputs. Result 0; an unknown op answers UNKNOWN (999). |
| 6 | |
| 7 | fn nvml_step s edit ulong SN b edit uchar BN to ulong |
| 8 | if eq get s 22 0 |
| 9 | put s 5 0 |
| 10 | put s 6 0 |
| 11 | put s 7 0 |
| 12 | put s 27 0 |
| 13 | end |
| 14 | op = get s 0 |
| 15 | if eq op 1 |
| 16 | init s b |
| 17 | ret 0 |
| 18 | end |
| 19 | if eq op 2 |
| 20 | shut s b |
| 21 | ret 0 |
| 22 | end |
| 23 | if eq op 3 |
| 24 | count s |
| 25 | ret 0 |
| 26 | end |
| 27 | if eq op 4 |
| 28 | handle s |
| 29 | ret 0 |
| 30 | end |
| 31 | if eq op 5 |
| 32 | name s b |
| 33 | ret 0 |
| 34 | end |
| 35 | if eq op 6 |
| 36 | uuid s b |
| 37 | ret 0 |
| 38 | end |
| 39 | if eq op 7 |
| 40 | temp s b |
| 41 | ret 0 |
| 42 | end |
| 43 | if eq op 8 |
| 44 | mem s b |
| 45 | ret 0 |
| 46 | end |
| 47 | if eq op 9 |
| 48 | util s b |
| 49 | ret 0 |
| 50 | end |
| 51 | if eq op 10 |
| 52 | procs s b |
| 53 | ret 0 |
| 54 | end |
| 55 | done s 999 |
| 56 | ret 0 |
| 57 | end |