lens.resources.gpu
GPU identity detection.
Module Contents
Functions
API
Detect worker-local GPU identity from NVML.
local_rank is the rank’s index within CUDA_VISIBLE_DEVICES. Callers
that already know their local rank should pass it explicitly; otherwise the
helper falls back to common launcher environment variables and then rank 0.