Lune

ICML2023Top-tier venue

Rockmate: an Efficient, Fast, Automatic and Generic Tool for Re-materialization in PyTorch

Xunyi Zhao, Théotime Le Hellard, Lionel Eyraud-Dubois, Julia Gusak, Olivier Beaumont

Abstract

We propose Rockmate to control the memory requirements when training PyTorch DNN models. Rockmate is an automatic tool that starts from the model code and generates an equivalent model, using a predefined amount of memory for activations, at the cost of a few re-computations. Rockmate automatically detects the structure of computational and data dependencies and rewrites the initial model as a sequence of complex blocks. We show that such a structure is widespread and can be found in many models in the literature (Transformer based models, ResNet, RegNets,...). This structure allows us to solve the problem in a fast and efficient way, using an adaptation of Checkmate (too slow on the whole model but general) at the level of individual blocks and an adaptation of Rotor (fast but limited to sequential models) at the level of the sequence itself. We show through experiments on many models that Rockmate is as fast as Rotor and as efficient as Checkmate, and that it allows in many cases to obtain a significantly lower memory consumption for activations (by a factor of 2 to 5) for a rather negligible overhead (of the order of 10% to 20%). Rockmate is open source and available at https: //github.com/topal-team/rockmate .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • A fast heuristic to optimize time-space tradeoff for large models cites Efficient Combination of Rematerialization and Offloading for Training DNNs
  • POET: Training Neural Networks on Tiny Devices with Integrated Rematerialization and Paging cites Dynamic Tensor Rematerialization
  • POET: Training Neural Networks on Tiny Devices with Integrated Rematerialization and Paging cites Efficient Combination of Rematerialization and Offloading for Training DNNs
  • Efficient Combination of Rematerialization and Offloading for Training DNNs cites Dynamic Tensor Rematerialization
  • HiRemate: Hierarchical Approach for Efficient Re-materialization of Neural Networks cites Dynamic Tensor Rematerialization
  • HiRemate: Hierarchical Approach for Efficient Re-materialization of Neural Networks cites POET: Training Neural Networks on Tiny Devices with Integrated Rematerialization and Paging
  • HiRemate: Hierarchical Approach for Efficient Re-materialization of Neural Networks cites Efficient Combination of Rematerialization and Offloading for Training DNNs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. SpeedLoader: An I/O efficient scheme for heterogeneous and distributed LLM operationYiqi Zhang, Yang YouNeurIPS 2024 · 6 citations
  2. A fast heuristic to optimize time-space tradeoff for large modelsAkifumi Imanishi, Zijian Xu, Masayuki Takagi, Sixue Wang et al.NeurIPS 2023 · 2 citations
  3. HiRemate: Hierarchical Approach for Efficient Re-materialization of Neural NetworksJulia Gusak, Xunyi Zhao, Théotime Le Hellard, Zhe Li et al.ICML 2025

Builds on4

  1. Dynamic Tensor RematerializationMarisa Kirisame, Steven Lyubomirsky, Altan Haan, Jennifer Brennan et al.ICLR 2021 · 115 citations
  2. Varuna: scalable, low-cost training of massive deep learning modelsSanjith Athlur, Nitika Saran, Muthian Sivathanu, Ramachandran Ramjee et al.EuroSys 2022 · 81 citations
  3. Efficient Combination of Rematerialization and Offloading for Training DNNsOlivier Beaumont, Lionel Eyraud-Dubois, Alena ShilovaNeurIPS 2021 · 69 citations
  4. POET: Training Neural Networks on Tiny Devices with Integrated Rematerialization and PagingShishir G. Patil, Paras Jain, Prabal Dutta, Ion Stoica et al.ICML 2022 · 52 citations

Related papers

  1. Memory Optimization for Deep NetworksAashaka Shah, Chao-Yuan Wu, Jayashree Mohan, Vijay Chidambaram et al.ICLR 2021 · 29 citations
  2. Occamy: Memory-efficient GPU Compiler for DNN InferenceJaeho Lee, Shinnung Jeong, Seungbin Song, Kunwoo Kim et al.DAC 2023 · 3 citations
  3. T-Control: An Efficient Dynamic Tensor Rematerialization System for DNN TrainingZehua Wang, Junmin Xiao, Xiaochuan Deng, Huibing Wang et al.ASPLOS 2026 · 2 citations
  4. EXACT: Scalable Graph Neural Networks Training via Extreme Activation CompressionZirui Liu, Kaixiong Zhou, Fan Yang, Li Li et al.ICLR 2022 · 72 citations
  5. Sparse Weight Activation TrainingMd Aamir Raihan, Tor M. AamodtNeurIPS 2020 · 83 citations
Dusk over the sea between two cliffs drawn in fine vertical lines