This and gputil are now documented here: https://docs.fast.ai/dev/gpu.html#accessing-nvidia-gpu-info-programmatically.