device_report
device_report()What this installation can see, as plain data.
Returns
| Name | Type | Description |
|---|---|---|
| dict[str, Any] | torch and cuda_build as strings; backend, the accelerator that will be used, |
|
| dict[str, Any] | or None for the processor; device, what to call it; arch_list, the |
|
| dict[str, Any] | architectures a CUDA build was compiled for; and gpu_present_but_unusable, which |
|
| dict[str, Any] | is the one worth acting on. |
gpu_present_but_unusable reads device_count() rather than is_available(), and that is the whole subtlety: with a CUDA 13 build on a Pascal card the first returns 1 and the second False - torch enumerates the card and cannot initialise it, which is exactly the case to report. Testing for zero detects nothing. The driver is asked as well, because a build with no CUDA support at all enumerates nothing either way.
cuda_build answers about CUDA and about nothing else. It read "cpu-only build" until 0.8.0a85, which is true of a processor-only Linux wheel and false of every macOS one: those carry a working mps backend, so the report called the build CPU-only two lines above device: mps on a machine that was about to train on its GPU - measured on an M3 Pro on 2026-11-10, #468. What that string was reaching for is already carried by backend, device and gpu_present_but_unusable, and a value whose truth depends on a sibling field is exactly what cost that.