spark-connector
aien-dev/spark-connector
Brought by drakestapleton
spark-connector / gates / hostile / gpu.om
| 1 | note hostile probe: open the NVIDIA control device; prints the open result |
| 2 | text dv "/dev/nvidiactl" |
| 3 | text m1 "gpu open -1\n" |
| 4 | text m2 "gpu opened\n" |
| 5 | fn main to int |
| 6 | fd = fopen dv 0 len dv 2 0 |
| 7 | if lt fd 0 |
| 8 | k = write 1 m1 0 len m1 |
| 9 | ret 0 |
| 10 | end |
| 11 | k = write 1 m2 0 len m2 |
| 12 | ret 0 |
| 13 | end |