Skip to main content

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 with fp_arena.disable_auto_extensions(); enable a single SDFG explicitly with sdfg.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_math from DaCe's compiler flags (otherwise on by default). Auto-enable scopes this to the SR compile; the explicit enable_fp_arena_extensions makes it a persistent default.
  • Both types capture each operation's result exactly (error-free), which is what matters for error analysis. float32sr evaluates each op in double (exact for +/−/×) and rounds by perturbing the dropped mantissa bits; float64sr uses error-free transforms (TwoSum, FMA TwoProd) since there is no wider native type, then rounds against the exact residual (ulp is 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)

Source distribution for fp-arena 0.1.0
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)

Table of built distributions (wheels) for fp-arena 0.1.0
File Interpreter ABI Platform Actions
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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page