Abstract
Huffman decoding is a critical bottleneck in the decompression of scientific data on GPUs due to its sequential nature and poor memory access patterns. This paper introduces deep architectural optimizations, including shared memory buffering and online resource tuning, to overcome these challenges. By dynamically allocating GPU resources and coalescing memory writes, the proposed methods achieve a 3.64× speedup in Huffman decoding and a 2.43× improvement in overall decompression throughput compared to existing state-of-the-art solutions.
Introduction
High-performance computing (HPC) simulations generate massive volumes of data, necessitating the use of error-bounded lossy compression techniques like SZ. While these compressors effectively reduce storage requirements, decompressing this data on GPUs often encounters a significant bottleneck: Huffman decoding. The variable-length nature of Huffman codes makes them inherently sequential, posing a challenge for the massively parallel architecture of GPUs. Existing solutions often struggle with the high compression ratios typical of scientific data, leading to slow, fragmented memory access.
Architectural Optimizations
To address the limitations of existing GPU-based Huffman decoders, such as Self-Synchronization and Gap Arrays, several deep architectural optimizations were implemented.
Shared Memory Buffering
A primary performance killer in high-compression scenarios is the "memory stride" problem. When data is highly compressed, the output indices for different threads are far apart, leading to uncoalesced and inefficient global memory writes. By first decoding symbols into fast, block-local shared memory, threads can later perform a single, efficient coalesced transaction to global memory once the buffer is full.
Online Shared Memory Tuning
Shared memory is a limited resource on GPUs. There is a delicate trade-off between giving each thread more memory (increasing throughput per thread) and maintaining high occupancy (running more blocks in parallel). As shown in the figure below, the relationship between buffer size and throughput is non-linear and dataset-dependent.
The authors developed an online tuning algorithm that classifies data sequences by their compression ratio in real-time. This allows the system to launch kernels with the optimal shared memory configuration for specific data segments, maximizing hardware utilization. The overhead for this tuning is minimal, approximately 220 microseconds, making it viable even for smaller datasets.
Performance Evaluation
The optimized decoders were evaluated using eight representative scientific datasets from the Scientific Data Reduction Benchmarks (SDRB), including HACC (cosmology), EXAALT (molecular dynamics), and CESM-ATM (climate modeling).
Key Results
The optimizations yielded substantial performance gains across all tested datasets. On an Nvidia V100 GPU, the decoding speedup averaged 3.64× compared to the baseline Huffman decoder in cuSZ. Total decompression performance, which includes inverse quantization and other steps, improved by an average of 2.43×.
As detailed in the performance comparison above, the optimized Self-Synchronization and Gap Array techniques consistently outperformed their original counterparts. For instance, in the HACC dataset, the overall decompression speedup reached 3.14× for optimized Self-Sync and 4.27× for optimized Gap Array. Most datasets achieved decoding throughputs exceeding 100 GB/s.
Conclusion
By leveraging shared memory and dynamic resource tuning, this work significantly alleviates the Huffman decoding bottleneck in GPU-accelerated lossy compression. These optimizations enable high-speed data reduction that is practical for exascale computing. While the Gap Array method generally offers higher performance, it requires encoder modifications; Self-Synchronization remains a robust alternative for existing compressed formats. Future work will explore extending these techniques to general-purpose text compression and newer GPU architectures like the Nvidia A100.
Summary updated