pycauset.cuda.current_device
Returns the name of the current compute device.
If CUDA is inactive, this returns a CPU-only identifier.
Returns
- str: Device name.
Notes
- The string is a high-level label (e.g.,
AutoSolver (CPU Only)orAutoSolver (CPU + CUDA (NVIDIA GPU))). - For detailed hardware properties, call
pycauset.cuda.benchmark().
Exceptions / warnings
- Returns a CPU identifier if CUDA is inactive.
Example
import pycauset as pc
print(pc.cuda.current_device())
if pc.cuda.is_available():
print("GPU active")
else:
print("CPU-only routing")