TorchLean API

NN.API.Trainer.Memory

Training Memory Monitoring #

CUDA allocator sampling and drift warnings shared by TorchLean training loops.

State carried by the CUDA-memory drift detector used by sustained training runs.

  • firstStep :
  • firstAvailableBytes :

    Driver-free bytes plus reclaimable cached bytes at the first sample.

  • warned : Bool
Instances For

    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.

      Instances For