Parallel Huffman
Huffman coding at extreme performance on modern GPU architectures.
Huffman coding is the lossless stage that follows prediction and quantization in an error-bounded compressor, and on a GPU it is the stage that stubbornly refuses to parallelize: the codebook is built from a tree, and the codewords are variable-length. This work makes both parts run on the device.
The code lives today inside pSZ/cuSZ, as its Huffman codec. A standalone repository is planned. PaperSlidesRepo
What it does
- An efficient parallel codebook construction on GPUs that scales with the number of input symbols.
- A reduction-based encoding scheme that merges codewords on the device rather than serializing them.
- Whole-GPU tuning through state-of-the-art CUDA APIs, including Cooperative Groups.
- Evaluation on six real-world application datasets across two GPUs, against a multi-threaded CPU Huffman encoder built for the comparison.
- A follow-on decoding path, so post hoc analysis is not left waiting on the stage that compression already made fast (IPDPS '22, below).
Two views of one merge
reduce-merge, shuffle-mergeResults
encoding throughput, from the IPDPS '21 paper-
up to 5.0× on NVIDIA RTX 5000, over the state-of-the-art GPU Huffman encoder
-
up to 6.8× on NVIDIA V100, over the same
-
up to 3.3× over a multi-threaded encoder on two 28-core Xeon Platinum 8280 CPUs
Papers
chronologically ordered-
IPDPS '21Revisiting Huffman Coding: Toward Extreme Performance on Modern GPU Architectures Jiannan Tian, Cody Rivera, Jieyang Chen, Dingwen Tao, Sheng Di, and Franck Cappello. IEEE International Parallel & Distributed Processing Symposium, (Virtual Event) Portland, OR, May 17–21, 2021. PaperSlides
-
IPDPS '22Optimizing Huffman Decoding for Error-Bounded Lossy Compression on GPUs Cody Rivera, Sheng Di, Jiannan Tian, Xiaodong Yu, Dingwen Tao, and Franck Cappello. IEEE International Parallel & Distributed Processing Symposium, Lyon, France, May 30 – June 3, 2022. arXiv