Skip to content

About

GPU-accelerated graph-composable compression pipeline builder for analytical workflows.

Topics

Resources

Contributing

Stars

9 stars

Watchers

2 watching

Forks

Repository files navigation

FZGPUModules

CI Docs License

GPU-accelerated graph composable compression pipeline builder for analytical workflows.

Overview

FZGPUModules is a CUDA library for building composable, high-throughput compression pipelines. Each pipeline is a directed acyclic graph (DAG) of stages - coders, predictors, quantizers, shufflers, transforms, fused stages, and external stages - connected and executed entirely on the GPU with stream-ordered memory management.

Key properties:

  • Modular — mix and match stages (Lorenzo, G-Interp, Quantizer, RLE, RZE, RRE, Bitshuffle, TUPL, Huffman, ANS, …)
  • Pipeline Specialization — finalize() recognizes supported subgraphs and binds declaration-driven specialization strategies; generated kernels are compiled and cached on first use
  • High throughput — parallel level execution, persistent scratch, stream-ordered allocation
  • Memory-efficient — MINIMAL and PREALLOCATE strategies; buffer coloring to alias non-overlapping allocations
  • File format — FZM format with CRC32 checksums and full stage config serialization

Documentation for LLM users

  • AGENTS.md — repo guide for AI coding agents: pipeline model, stage catalog, build/test recipes, ownership rules, and key gotchas.

Requirements

Requirement Requirement or scope Notes
CUDA Toolkit 11.2+ Configure-time API floor; older toolkits are not a validated compatibility matrix
Host Compiler C++17 compiler and standard library Must be supported by the selected CUDA toolkit; see build requirements
C++ Standard C++17
CMake 3.24+
Python 3.7+ Required at build time for embedded JIT headers and source fingerprints
Host byte order Little-endian

Building and Installing

git clone https://github.com/szcompressor/FZGPUModules.git
cd FZGPUModules
git submodule update --init --recursive

cmake --preset release -DCMAKE_CUDA_ARCHITECTURES=native
cmake --build build/release -j$(nproc)
cmake --install build/release --prefix /your/install/prefix

Quick Start

#include "fzgpumodules.h"

// 1. Build a pipeline
fz::Pipeline pipeline(n * sizeof(float));

auto* lrz = pipeline.addStage<fz::LorenzoQuantStage<float, uint16_t>>(
    fz::LorenzoQuantStage<float, uint16_t>::Config{1e-4f});
auto* rle = pipeline.addStage<fz::RLEStage<uint16_t>>();

pipeline.connect(rle, lrz, "codes");
pipeline.finalize();

// 2. Compress
void* d_compressed = nullptr;
size_t compressed_size = 0;
pipeline.compress(d_input, n * sizeof(float), &d_compressed, &compressed_size, stream);
// d_compressed is pool-owned — do NOT cudaFree it.

// 3. Decompress
void* d_output = nullptr;
size_t output_size = 0;
pipeline.decompress(d_compressed, compressed_size, &d_output, &output_size, stream);
cudaStreamSynchronize(stream);
// d_output is pool-owned — do NOT cudaFree it.
// Call pipeline.setPoolManagedDecompOutput(false) for caller-owned output.

See examples/ for more patterns: caller-allocated output, file I/O, multi-branch pipelines.


Available Stages

The table lists the stable main catalog. Experimental modules remain on development and are unavailable in this build.

Stage Description
LorenzoQuantStage<TInput, TCode> Fused float predictor + quantizer (lossy, 1D/2D/3D)
LorenzoStage<T> Plain integer Lorenzo predictor (lossless)
TiledLorenzoStage<T> Dimension-aware (tiled separable) Lorenzo predictor (lossless, 2D/3D, cuSZp3 delta)
GInterpStage<TInput, TCode> Multi-level spline interpolation predictor + quantizer (lossy, 3D, cuSZ-Hi port)
AdaptiveLorenzoStage<T> Per-tile adaptive Lorenzo — picks the cheapest of LZ1/LZ2 x centering by exact encoded cost (lossless, FSZ)
QuantizerStage<TInput, TCode> Direct-value quantizer (ABS/REL/NOA error modes)
DifferenceStage<T, TOut> First-order difference / cumulative-sum coding
LogTransformStage<TInput> Log transform — turns a point-wise relative bound into an absolute one for a downstream ABS quantizer (Liang et al., CLUSTER'18)
RLEStage<T> Run-length encoding
BitshuffleStage GPU bit-matrix transpose
TUPLStage AoS <-> SoA tuple transpose — regroups interleaved dim-field records by field (LC TUPLk port)
RZEStage LC zero-word bitmap reducer with recursive bitmap compression
RREStage LC repeated-word bitmap reducer with recursive bitmap compression
RAZEStage Applies RZE to an automatically selected number of upper bits per chunk; stores lower bits verbatim (LC port)
RAREStage Applies RRE to an automatically selected number of upper bits per chunk; stores lower bits verbatim (LC port)
CLOGStage Per-subchunk adaptive bit-width coding, 32 subchunks per chunk (LC port)
HCLOGStage CLOG plus a per-subchunk TCMS/zigzag reinterpretation fallback (LC port)
GPULZStage GPU LZSS dictionary coder derived from GPULZ (substantially rewritten kernels); optional split mode emits literals/lengths/offsets/meta as four ports for a GPU-ZSTD-style chain
ZigzagStage<TIn, TOut> Zigzag encode/decode
NegabinaryStage<TIn, TOut> Negabinary encode/decode
BitpackStage<T> Pack/unpack power-of-two value streams
AdaptiveBitpackStage<T> Per-block adaptive fixed-rate bit-plane coding (cuSZp/cuSZp2 port)
HuffmanStage<T> GPU Huffman entropy coding (cuSZ port)
ANSStage GPU rANS entropy coding (dietGPU port)
BitplaneRZEStage Fused bitplane transpose + zero-group RZE lossless encoder (FZ-GPU port)
MergeStage Concatenate N producer ports into one buffer / split back (structural)
ROIBinSplitStage<T> Split detector fields into full-resolution ROI, binned background, and peak-table branches

Memory Strategies

Strategy Description
MINIMAL Allocate on demand, free at last consumer. Lowest peak GPU memory. Default.
PREALLOCATE Allocate everything at finalize(). Enables buffer coloring.
fz::Pipeline pipeline(input_bytes, fz::MemoryStrategy::PREALLOCATE);

CLI

# Compress using a stage chain
fzgmod-cli -z -i data.f32 -o compressed.fzm --stages "lorenzo->bitshuffle->rze" -m rel -e 1e-3

# Decompress and compare
fzgmod-cli -x -i compressed.fzm -o decompressed.f32 --compare data.f32 --report

# Compress using a TOML pipeline config
fzgmod-cli -z -i data.f32 -c examples/presets/pfpl.toml -o compressed.fzm --report

Acknowledgements

FZGPUModules incorporates algorithms and GPU kernels ported or reimplemented from the following projects. Most are BSD-3-Clause licensed; the exceptions are dietGPU (MIT), and GPULZ and AIZ_VLDB26 (no license declared upstream).

Project Stages
LC framework — Burtscher et al., Texas State University RZEStage, RREStage, RAZEStage, RAREStage, CLOGStage, HCLOGStage, TUPLStage, BitshuffleStage, DifferenceStage, QuantizerStage
cuSZ — Argonne NL, Indiana U, et al. LorenzoQuantStage, HuffmanStage
FZ-GPU — Zhang, Tian et al. (via cuSZ repo) BitplaneRZEStage
cuSZ-Hi — Indiana U, Argonne NL GInterpStage
cuSZp / cuSZp2 / cuSZp3 — Huang, Di et al., Argonne NL AdaptiveBitpackStage, TiledLorenzoStage
dietGPU — Meta Platforms (MIT) ANSStage
GPULZ — Zhang, Tian, Di et al. (ICS '23; no license declared upstream) GPULZStage
AIZ_VLDB26 — Boyuan Zhang (no license declared upstream) GPULZStage all-zero-chunk fast path
FSZ — Jiajun Huang, SC '26 (arXiv:2607.15413) — algorithmic attribution only; written from the paper, before FSZ 1.0.0 was released AdaptiveLorenzoStage, LorenzoStage centering / order-2, LorenzoQuantStage centering
Liang, Di, Tao, Chen, Cappello — IEEE CLUSTER 2018 — algorithmic attribution only LogTransformStage
ROIBIN-SZ — Underwood, Yoon, Gok, Di, Cappello — independent GPU/DAG implementation of the published design ROIBinSplitStage
SZp / fZ-light — Huang, Di et al. (MIT) szp_composed.toml (Quantizer → Lorenzo → AdaptiveBitpack)

For per-stage attribution details, copyright notices, relationship types (direct port, algorithmic reimplementation, or vendored), and paper citations, see docs/acknowledgements.md and THIRD_PARTY.md.


Citation

If you reference this work, please cite:

Note: This citation corresponds to the v1.0 release; the 2.0 API may differ.

@inproceedings{ruiter2025fzmodules,
    author = {Ruiter, Skyler and Tian, Jiannan and Song, Fengguang},
    title = {FZModules: A Heterogeneous Computing Framework for Customizable Scientific Data Compression Pipelines},
    year = {2025},
    url = {https://doi.org/10.1145/3731599.3767376},
    booktitle = {Proceedings of the SC '25 Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis},
    pages = {332-338},
    series = {SC Workshops '25}
}

For full documentation — API reference, stage details, build options, file format, and contributor guides — see the official docs.

About

GPU-accelerated graph-composable compression pipeline builder for analytical workflows.

Topics

Resources

Contributing

Stars

9 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages