Manuscript Offprint

arXiv:2610.25033

PlaneZip: Lossless Bit-Plane Compression of Training Activations Offloaded over PCIe

Zhufan Gu, Qizhe Tang, Yuxin Wang, Xun Zhou, Hui Feng

Zhufan Gu, Qizhe Tang, Yuxin Wang, Xun Zhou, Hui Feng

Abstract—Training under a device-memory budget relies on tensor rematerialization: an evicted activation is either swapped to host memory or dropped and recomputed. Because GPU compute has outgrown PCIe bandwidth, cost-model planners such as MegTaiChi, which charge a swap its full transfer time, almost never swap, and swaps that fill idle link time carry only a small fraction of the saved activations. Saved activations, however, are homogeneously typed arrays with bit-level redundancy beyond zeros, which lightweight bit-plane compressors can remove at line rate. We present PlaneZip, which compresses swapped tensors on the copy path and plans around the compression. Its codec picks, for every 128-byte block, the smallest of zero-value, delta bit-plane, bit-plane, and a new zero-masked bit-plane encoding. A per-tensor predictor reuses the ratio of the previous iteration, and the planner budgets link time in compressed transfer times. On activations captured from five models trained on real data, the codec compresses BF16 activations by 1.71x and FP32 activations by 1.39x (geometric means), against 1.18x and 1.20x for zero-value compression. In trace-driven simulation of a PCIe 3.0 consumer GPU and a PCIe 4.0 datacenter GPU at half the activation memory, PlaneZip cuts the rematerialization overhead by 47% and 31% relative to a bandwidth-aware planner without compression, and by 73% and 54% relative to MegTaiChi's cost model, with an estimated engine area of 0.036 square millimeters.

Index Terms—DNN training, GPU memory management, tensor rematerialization, memory compression, bit-plane compression

I. INTRODUCTION

The activations that the forward pass saves for the backward pass dominate the memory footprint of DNN training [1], [2]. When they exceed the device memory, systems either oversubscribe it through unified virtual memory (UVM), which migrates pages on demand [3], [4], or rematerialize the activations explicitly. A saved tensor is either swapped to host memory and prefetched before its backward use [5]–[7], or dropped and recomputed from its inputs [1], [8], [9]. MegTaiChi [10] coordinates the two: when memory runs out, it evicts the tensor with the lowest cost, charging a swap its transfer time and a drop its recomputation time.

The two mechanisms scale differently. Recomputation runs at GPU speed, and the two GPUs we model differ by 23×23\times in peak math throughput, from a Turing-class consumer card training in FP32 to an Ampere-class datacenter card training in BF16, while their host links differ by only 2×2\times (PCIe 3.0 and 4.0). For the median saved byte, a swap takes 10−13×10-13\times longer than recomputing the same tensor (Section II-C), so a per-tensor cost model almost never picks it: in our simulations MegTaiChi's policy reduces to pure recomputation in 58 of 70 configurations. Swapping still pays when it uses link time that would otherwise idle, which bandwidth-aware planners such as Capuchin [7] exploit. That idle time is short, though: during one iteration the link can move only 6–37% of the saved bytes of the five models we study.

Compression enlarges that budget. Saved activations are large arrays of a single type, the property that Bit-Plane Compression (BPC) [11] exploits in GPU memory traffic. They contain zeros produced by ReLU and by causal attention masks, and neighboring floating-point values tend to share their high-order exponent bits. Hardware block compressors designed for GPU and main memory [11], [12] encode a 128-byte block in a few cycles, fast enough to sit on the copy path. The compressing DMA engine cDMA [13] applied zero-value compression (ZVC) to swapped activations, which captures ReLU sparsity but nothing else, and its swap schedule did not change with the compression it achieved.

This paper presents PlaneZip, which compresses swapped tensors on the copy path and plans around the compression. It rests on three observations from activations that we capture in real training iterations:

• Activations compress beyond their zeros. A per-block choice among four lightweight encodings, including a zero-masked bit-plane encoding that we add, compresses BF16 activations by 1.71×1.71\times (geometric mean over five models), against 1.18×1.18\times for ZVC (Section V-A).

• Compressibility is a stable per-tensor property. Training repeats the same operator sequence every iteration, which MegTaiChi exploits for its memory plans. Predicting each tensor’s compressed size from the previous iteration errs by less than 1% of the transferred bytes (Section V-B).

• Only a compression-aware planner turns compression into speed. Compressing the swaps chosen by a compression-unaware planner shortens transfers but leaves the freed link time unused. Budgeting the link with compressed transfer times, and ranking tensors by the recomputation or memory they save per second of transfer, recovers it (Section V-D).

We make the following contributions:

  • A characterization of the compressibility of saved activations in three CNNs and two Transformers, for six codecs in FP32 and BF16.

  • The PlaneZip codec: element-width-aware selection among ZVC, BPC's delta bit-plane transform, a bit-plane transform without the delta, and a new zero-masked bit-plane encoding, packed into 4 KB chunks that decode in

parallel, with a bit-exact reference implementation.

• A per-tensor compressibility predictor and a compression-aware swap and recomputation planner.

  • A trace-driven evaluation on a PCIe 3.0 consumer GPU and a PCIe 4.0 datacenter GPU, in which PlaneZip reduces the rematerialization overhead at 50% of the activation memory by 47% and 31% relative to a bandwidth-aware planner without compression.

References (42)

  • Training deep nets with sublinear memory cost (opens arXiv in a new tab)
  • Reducing activation recomputation in large transformer models
  • Understanding oversubscribed memory management for deep learning training
  • Forest: Access-aware GPU UVM management
  • vDNN: Virtualized deep neural networks for scalable, memory-efficient neural network design
  • SwapAdvisor: Pushing deep learning beyond the GPU memory limit via smart swapping
  • Capuchin: Tensor-based GPU memory management for deep learning
  • Checkmate: Breaking the memory wall with optimal tensor rematerialization
  • Dynamic tensor rematerialization
  • MegTaiChi: Dynamic tensor-based memory management optimization for DNN training
  • Bit-plane compression: Transforming data for better compression in many-core architectures
  • Compresso: Pragmatic main memory compression
  • Compressing DMA engine: Leveraging activation sparsity for training deep neural networks
  • AutoUVM: Automated Prefetching Framework for LLMs under UVM Oversubscription
  • Base-delta-immediate compression: Practical data compression for on-chip caches
  • A comprehensive memory management framework for CPU-FPGA heterogeneous SoCs
  • Baryon: Efficient hybrid memory management with compression and sub-blocking
  • An analysis of memory access patterns in RISC-V vector workloads on heterogeneous memory architectures
  • SHiP: Signature-based hit predictor for high performance caching
  • NVIDIA A100 tensor core GPU architecture
  • ImageNet large scale visual recognition challenge
  • PyTorch image models
  • ResNet strikes back: An improved training procedure in timm (opens arXiv in a new tab)
  • Language models are unsupervised multitask learners
  • Transformers: State-of-the-art natural language processing
  • Pointer sentinel mixture models
  • Deep residual learning for image recognition
  • Densely connected convolutional networks
  • EfficientNet: Rethinking model scaling for convolutional neural networks
  • An image is worth $16 \times 16$ words: Transformers for image recognition at scale
  • PyTorch: An imperative style, high-performance deep learning library
  • DrGPUM: Guiding memory optimization for GPU-accelerated applications
  • A study of BFLOAT16 for deep learning training (opens arXiv in a new tab)
  • ResNet50 v1.5 for PyTorch: Performance
  • NVIDIA Turing GPU architecture
  • FlashAttention: Fast and memory-efficient exact attention with IO-awareness
  • PASTA: A modular program analysis tool framework for accelerators
  • HybridGen: Efficient LLM generative inference via CPU-GPU hybrid computing (opens arXiv in a new tab)
  • Gist: Efficient data encoding for deep neural network training
  • ActNN: Reducing training memory footprint via 2-bit activation compressed training
  • Buddy compression: Enabling larger memory for deep learning and HPC workloads on GPUs
  • ZipNN: Lossless compression for AI models (opens arXiv in a new tab)