dgs.utils.torchtools.torch_memory_analysis

dgs.utils.torchtools.torch_memory_analysis(f: callable, file_name: str = './memory_snapshot.pickle', max_events: int = 100000) callable[source]

A decorator for torch memory analysis using torch.cuda.memory._record_memory_history().