Insights on Achieving Error Bounds in Lossy Quantizers

lessons learned on the path to guaranteeing n.w
1 / 26
Embed
Share

Explore the journey towards ensuring error bounds in lossy quantizers, crucial for handling vast scientific data in HPC settings. Learn about the challenges of lossy compression, support for heterogeneous systems, and a cutting-edge LC Framework tool for automatic compressor synthesis. Dive into how this framework guarantees error bounds, facilitates compatibility between CPUs and GPUs, and offers user extensibility. Discover the components and preprocessors of the LC Framework that enable both lossless and lossy compression while mitigating auto-correlation.

  • Lossy Quantizers
  • Error Bounds
  • Compression
  • HPC
  • LC Framework

Uploaded on | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers Alex Fallin and Martin Burtscher Texas State University Department of Computer Science San Marcos, Texas, USA

  2. Introduction Scientific data in HPC environments is becoming too large and being produced too fast Lossless compression typically cannot yield high compression ratios on this type of data Lossy compression needs to be error-bounded Support for heterogenous systems is important Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 1

  3. Introduction Lossy compression Three main error-bound types: ABS, REL, and NOA Error bounds are often not guaranteed Heterogenous systems Data compressed on one system (GPU or CPU) Accessed on another system (GPU or CPU) CPU/GPU compatibility rarely supported in SOTA Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 2

  4. LC Framework Tool for automatic compressor synthesis Can create lossy and lossless compression codes Guarantees error bounds Compatible between CPUs and GPUs Guarantees bit-for-bit parity User extensible Available in open source https://github.com/burtscher/LC-framework/ Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 3

  5. LC Framework Components Framework includes a set of components Components transform the data losslessly Mutators: transform values (e.g., TCMS) Shufflers: rearrange values (e.g., BIT) Predictors: guess values based on previous (e.g., DIFF) Reducers: compress the data (e.g., RLE) Include an inverse that reverses transformation Needed for decompression Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 4

  6. LC Framework Preprocessors Framework includes a set of preprocessors Preprocessors transform the data lossily ABS: quantizes data using an absolute error bound REL: quantizes data using a relative error bound NOA: quantizes data using a normalized ABS bound Include an inverse that reverses transformation Guarantees error bound Optional auto correlation mitigation Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 5

  7. LC Framework Operation Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 6

  8. LC Framework Demo How to generate the framework How to evaluate a compression algorithm How to search for a compression algorithm Restricting search with regular expressions Generating standalone compressors Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 7

  9. Lessons Learned Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 8

  10. Background Error Bounding We perform error bounding during quantization ABS: ????= ????????? ?????????????? ????????? ?????????????? ????????? REL: ????= a variant of ABS ???? ? NOA: ????= where ? = ???? ???? Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 9

  11. Background Error Bounding Only due to REL support LC Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 10

  12. Challenge 1 Floating-Point Math Quantization converts floats to integers Uses floating-point operations Floating-point arithmetic has finite precision Rounding errors can cause values to be quantized outside of the error bound Special floating-point values Infinity, Not a Number (NaN), denormal values May need to be handled separately Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 11

  13. Challenge 2 CPU/GPU Parity Parity between CPU and GPU is increasingly important in heterogenous computing Difficult to achieve Only supported by one tested compressor (MGARD) Compilers optimize code differently Emit fused multiply adds in different places Built-in libraries differ in implementation CUDA and C++ log functions produce different results Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 12

  14. Solution 1 Floating-Point Math Rounding errors are handled by double checking Compressor checks each value by decoding it In case of violation, stores the value losslessly Infinity and NaN are losslessly preserved Denormals are handled by the double checking Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 13

  15. Solution 2 Result Parity FMA disabled with compiler flags Technically degrades precision but supplies parity Non-matching built-in functions (pow and log) Implemented our own fully matching versions Only use fully IEEE 754 compliant operations Degrades precision but supplies parity Double checking catches any excessive degradation Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 14

  16. Related Work CPU Only ZFP Converts floats to integers, performs a decorrelating transform, data mutation, and bit shuffling Lossless compression applied after the above steps SPERR Uses wavelet transformations and SPECK Detects outliers and stores a correction factor Lossless compression step is ZSTD Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 15

  17. Related Work CPU Only SZ2 Uses Lorenzo prediction and linear regression followed by quantization Uses Huffman followed by GZIP after lossy stage SZ3 Often produces better compression ratios than SZ2 with similar throughputs Modular, lossless stage can be customized (e.g., ZSTD) Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 16

  18. Related Work GPU Only FZ-GPU Uses Lorenzo prediction followed by GPU-friendly multi-byte Huffman coding cuSZp Splits data into blocks, then quantizes and predicts values in non-zero blocks Compresses non-zero blocks using fixed-length encoding Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 17

  19. Related Work CPU and GPU MGARD-X Only other compressor to support compatible CPU/GPU compression/decompression Uses multigrid hierarchical data refactoring to decompose and recompose data Selective loading based on the hierarchy after decomposition to determine accuracy Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 18

  20. Experimental Methodology System GPU: NVIDIA RTX 4090, 16384 PEs, 128 SMs, 24 GB memory, nvcc 12.0.14 CPU: AMD Ryzen Threadripper 2950X (16 cores, 3.5GHz), gcc 12.2.1 We measure compression ratio and compression/decompression throughput Median of 9 runs Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 19

  21. Inputs SDRBench inputs: https://sdrbench.github.io/ Also generated single- and double-precision inputs that cover many special float values Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 20

  22. Results Special-Value Support Only other code that handles all values Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 21

  23. Results Cost of Parity Largest loss in compression ratio is only 8% Throughput mostly unaffected: native functions also slow, and code is memory-bound Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 22

  24. Results Cost of Double Checking Throughput mostly unaffected: code is memory- bound, and check is a small portion of runtime ABS only Compression ratio not impacted much: see next slide Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 23

  25. Results Double Checking of Rounding Rounding Errors Found REL unaffected Matches loss of compression ratio in previous slide Average 0.12% 0.00% 3.41% 0.00% 0.25% 0.00% 0.89% 0.00% 0.00% 0.00% 0.16% 0.00% 0.05% 0.00% Maximum 1.68% 0.00% 11.16% 0.00% 0.40% 0.00% 5.29% 0.00% 0.00% 0.00% 1.38% 0.00% 0.63% 0.00% ABS REL ABS REL ABS REL ABS REL ABS REL ABS REL ABS REL Allows larger error for larger values CESM EXAALT Affects few values in most cases for ABS Compression change from 2.9x to 3.2x HACC NYX Also an issue for other compressors Compression change 1.372x to 1.373x QMCPACK SCALE Still allows for good compression ISABEL Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 24

  26. Summary and Conclusions Built LC compression algorithm synthesis framework Techniques to guarantee error bound and parity Double checking to guarantee error bound Custom pow/log & no FMA to guarantee CPU/GPU parity Small impact on compression ratio and throughput Acknowledgements: Sheng & Franck, DOE & NVIDIA https://userweb.cs.txstate.edu/~burtscher/papers/codac24.pdf Contact: waf13@txstate.edu Lessons Learned on the Path to Guaranteeing the Error Bound in Lossy Quantizers 25

Related


More Related Content