All Projects → prigoyal → Pytorch_memonger

prigoyal / Pytorch_memonger

Licence: gpl-3.0
Experimental ground for optimizing memory of pytorch models

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytorch memonger

Gc
Simple, zero-dependency garbage collection for C
Stars: ✭ 851 (+281.61%)
Mutual labels:  memory-management
Ipyexperiments
jupyter/ipython experiment containers for GPU and general RAM re-use
Stars: ✭ 128 (-42.6%)
Mutual labels:  memory-management
Umpire
An application-focused API for memory management on NUMA & GPU architectures
Stars: ✭ 154 (-30.94%)
Mutual labels:  memory-management
Go Pmem
Native persistent memory support for Go
Stars: ✭ 57 (-74.44%)
Mutual labels:  memory-management
Automem
C++-style automatic memory management smart pointers for D
Stars: ✭ 71 (-68.16%)
Mutual labels:  memory-management
Memorypool
一个极简内存池实现
Stars: ✭ 131 (-41.26%)
Mutual labels:  memory-management
Articles Translator
📚Translate the distinct technical blogs. Please star or watch. Welcome to join me.
Stars: ✭ 606 (+171.75%)
Mutual labels:  memory-management
Ugc
A single-header incremental garbage collector library
Stars: ✭ 173 (-22.42%)
Mutual labels:  memory-management
Mesh
A memory allocator that automatically reduces the memory footprint of C/C++ applications.
Stars: ✭ 1,243 (+457.4%)
Mutual labels:  memory-management
Heapinspector For Ios
Find memory issues & leaks in your iOS app without instruments
Stars: ✭ 1,819 (+715.7%)
Mutual labels:  memory-management
Memreduct
Lightweight real-time memory management application to monitor and clean system memory on your computer.
Stars: ✭ 1,101 (+393.72%)
Mutual labels:  memory-management
Vulkanmemoryallocator
Easy to integrate Vulkan memory allocation library
Stars: ✭ 1,136 (+409.42%)
Mutual labels:  memory-management
Bdwgc
The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (libgc, bdwgc, boehm-gc)
Stars: ✭ 1,855 (+731.84%)
Mutual labels:  memory-management
Errand Boy
A memory-conscious alternative to os.fork() and subprocess.Popen().
Stars: ✭ 34 (-84.75%)
Mutual labels:  memory-management
Rmm
RAPIDS Memory Manager
Stars: ✭ 154 (-30.94%)
Mutual labels:  memory-management
Sralloc
Memory allocators
Stars: ✭ 25 (-88.79%)
Mutual labels:  memory-management
Isoalloc
A general purpose memory allocator that implements an isolation security strategy to mitigate memory safety issues while maintaining good performance
Stars: ✭ 130 (-41.7%)
Mutual labels:  memory-management
Broom
An ergonomic tracing garbage collector that supports mark 'n sweep garbage collection
Stars: ✭ 203 (-8.97%)
Mutual labels:  memory-management
Blog
Our open source benchmarks and code samples
Stars: ✭ 162 (-27.35%)
Mutual labels:  memory-management
Avoid Memory Leak Android
🔥 Examples of memory leaks and common patterns that cause them in Android development and how to fix/avoid them
Stars: ✭ 140 (-37.22%)
Mutual labels:  memory-management

PyTorch Memory optimizations via gradient checkpointing

This repository contains implementation of various PyTorch models using the gradient checkpointing[1] which allows trading compute for memory and hence allows training bigger/wider models and use large minibatch sizes.

The application of checkpointing is showcased on various models:

  • ResNet
  • DenseNet
  • LSTM model from pytorch examples here
  • VNet model which is used in medical imaging applications, available here

Results of checkpointing on these models are showcased below:

In order to use the models, you need to install PyTorch master following instructions from here

To run checkpointed models and their baseline tests, follow the commands below:

# for checkpointed
python test_memory_optimized.py

# for baseline
python test_memory_optimized.py

Tutorial

We provide a tutorial to describe how to use checkpointing for various kinds of models.

There are few special kinds of layers like Batch normalization, dropout that should be handled carefully. The details for handling those are also available in the tutorial

References

[1]. Siskind, Jeffrey Mark, and Barak A. Pearlmutter. "Divide-and-Conquer Checkpointing for Arbitrary Programs with No User Annotation." arXiv preprint arXiv:1708.06799 (2017).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].