stillwater-sc/universal
Large collection of number systems providing custom arithmetic for mixed-precision algorithm development and optimization for AI, Machine Learning, Computer Vision, Signal Processing, CAE, EDA, control, optimization, estimation, and approximation.
What it solves
Universal is a C++ template library designed to replace native integer and floating-point types with custom arithmetic types. This allows developers to optimize algorithms for specific precision and dynamic range requirements, which is critical for improving performance and energy efficiency in embedded systems and Deep Learning applications where standard IEEE-754 floating-point may be overkill or inefficient.
How it works
It provides a header-only library of plug-in replacement types that can be used in parameterized computational kernels. Instead of using double or float, developers can use specialized formats like half-precision (half), bfloat16, or fixed-point types. The library includes fast implementations of formats that lack universal hardware support across different architectures (x86, ARM, RISC-V, GPUs).
Who it’s for
The library is intended for developers working in AI, Digital Signal Processing (DSP), High-Performance Computing (HPC), and High-Frequency Trading (HFT) who need to experiment with or implement mixed-precision algorithms.
Highlights
- Wide Variety of Formats: Supports quarter, half, and quad precision, as well as NVIDIA TensorFloat and Google's bfloat16.
- Custom Number Systems: Includes support for static and elastic integers, decimals, fixed-points, rationals, linear floats, tapered floats, logarithmic, and adaptive-precision types.
- Hardware Agnostic: Provides software implementations for formats that are not natively supported by all hardware.
- Low Friction: Header-only design allows for easy integration into existing C++ projects via template parameterization.
Related
- Project
- Project
- Project
- Project
- Project