Training Memory Monitoring #
CUDA allocator sampling and drift warnings shared by TorchLean training loops.
def
TorchLean.Trainer.Memory.cadence
(options : Runtime.Autograd.Torch.Config)
(steps requested : ℕ)
:
Resolve an explicit CUDA-memory cadence, or enable periodic sampling for very long runs.
Instances For
def
TorchLean.Trainer.Memory.sample
(options : Runtime.Autograd.Torch.Config)
(watchEvery totalSteps done : ℕ)
(state? : Option State)
:
Sample the CUDA allocator and warn when sustained loss of usable memory projects exhaustion before the requested run completes. Unused tensor buffers and kernel workspaces are reclaimable, so cache growth alone should not look like a loss of memory available for later allocations.