Returns true if GPU devices are present in the container. Checks both the native Linux NVIDIA control device (`/dev/nvidiactl`) and the WSL2 DXG device (`/dev/dxg`). CDI injects exactly one of these depending on the host kernel; the other will not exist.
()
| 744 | /// the WSL2 DXG device (`/dev/dxg`). CDI injects exactly one of these |
| 745 | /// depending on the host kernel; the other will not exist. |
| 746 | fn has_gpu_devices() -> bool { |
| 747 | std::path::Path::new("/dev/nvidiactl").exists() || std::path::Path::new("/dev/dxg").exists() |
| 748 | } |
| 749 | |
| 750 | /// Enumerate per-GPU device nodes (`/dev/nvidia0`, `/dev/nvidia1`, …). |
| 751 | fn enumerate_gpu_device_nodes() -> Vec<String> { |