Support for GPU-related objects
Is coredumpy able to store & recover the objects on GPUs (e.g. nn.Module, torch.Tensor)?
If you meant restoring the Tensor in your local GPU - no it can't. Basically coredumpy uses torch.save() and torch.load(weight_only=True) for Tensor and it does not do anything special for nn.Module. So you'll be able to store the value of the Tensor, and you'll have the basic structures (attributes) for nn.Module, but you won't have the underlying graph with grad capability. You won't have your Tensor in your GPU either.
Got it — so each “value” will be recovered and placed on the CPU. coredumpy just tracks these values, rather than the full context (e.g., the original device where each value resided) at the time of the crash?
That's right. However, if you want, you can always customize how your tensor is saved & restored - the data is probably there. Maybe simply changing weight_only=True will give you the device info.