FP-Arena
A rapid-prototyping environment for testing custom floating-point types in DaCe. FP-Arena adds new FP types (and the C++ that implements them) as a plugin that registers itself into DaCe at import time — no fork, no DaCe source changes.
Install
Pick the DaCe FP-Arena runs on with an extra; both install the dace package, so take exactly one:
pip install "fp-arena[extended]" # DaCe extended (PyPI dace-extended): all of FP-Arena
pip install "fp-arena[dace]" # spcl's dace: the types and change_and_propagate_fp_types; not fp_arena.search
fp_arena.search uses DaCe extended's vectorization passes.
The benchmark kernels the examples and tests use (heat3d, hdiff, vadv, CLOUDSC) live in fp_arena.corpus; their
reference data (.h5, .sdfg) ships only with a checkout.
Already have a DaCe checkout (any extended-based branch) you want to use? Install without an extra, which pulls no
DaCe:
pip install fp-arena # or, from a checkout: pip install -e .
Quick start
Importing fp_arena registers the types and auto-enables any SDFG that uses
them, so there is nothing else to call:
import numpy as np
import dace
import fp_arena # registers types + auto-enables on compile
@dace.program
def axpy(a: fp_arena.float32sr[1024], b: fp_arena.float32sr[1024],
c: fp_arena.float32sr[1024]):
for i in dace.map[0:1024]:
c[i] = a[i] * b[i] + c[i] # arithmetic rounds stochastically
sdfg = axpy.to_sdfg()
a = np.full(1024, 1.0, np.float32)
b = np.full(1024, 1.0, np.float32)
c = np.zeros(1024, np.float32)
sdfg(a=a, b=b, c=c) # headers injected + fast-math stripped automatically
Notes
- Auto-enable wraps
SDFG.compile(installed on import) and only touches SDFGs that actually use an FP-Arena type. Turn it off withfp_arena.disable_auto_extensions(); enable a single SDFG explicitly withsdfg.enable_fp_arena_extensions(). - The SR types are header-only, allocation-free, and
__host__/__device__capable (GPU codegen works; the device RNG is clock-seeded). - Stochastic rounding needs exact IEEE rounding, so enabling removes
-ffast-math//fp:fast/--use_fast_mathfrom DaCe's compiler flags (otherwise on by default). Auto-enable scopes this to the SR compile; the explicitenable_fp_arena_extensionsmakes it a persistent default. - Both types capture each operation's result exactly (error-free), which is what
matters for error analysis.
float32srevaluates each op indouble(exact for +/−/×) and rounds by perturbing the dropped mantissa bits;float64sruses error-free transforms (TwoSum, FMA TwoProd) since there is no wider native type, then rounds against the exact residual (ulpis a power of two, so the probability compare is exact too).
Metadata
Release files for fp-arena 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fp_arena-0.1.0.tar.gz | 133.0 kB | Without provenance | Details for fp_arena-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fp_arena-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for fp_arena-0.1.0-py3-none-any.whl |
Total release size: 247.1 kB
Release files / fp_arena-0.1.0.tar.gz
| Download URL | fp_arena-0.1.0.tar.gz |
|---|---|
| Size | 133.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30b8a5200073f6f27e7bf07908e6af099951c23e027bfe8e107440ad25200948
|
|
BLAKE2b-256 checksum How to use checksums |
4f5db44dfb01a392d4dd45f7d446a25f344d1de54adf9ec1141872c2d82fec4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / fp_arena-0.1.0-py3-none-any.whl
| Download URL | fp_arena-0.1.0-py3-none-any.whl |
|---|---|
| Size | 114.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7f0ac9de81c6aed6fe13c1e6c610ca8fdc9e293af7de7304c3380c8fbea1937
|
|
BLAKE2b-256 checksum How to use checksums |
43886b180ff115ff99853d42a8c82138ab928d4171e45a1cea44b8f5f73d29fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for fp-arena 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.