Skip to main content

ThermoC `erasure`: reversibility analysis, Landauer erased-bit accounting, Bennett scheduling, and adiabatic execution planning for computation graphs

Project description

thermoc-erasure

ThermoC erasure — reversibility analysis, Landauer erased-bit accounting, erasure-minimizing graph rewrites (uncomputation + Bennett pebble scheduling), and adiabatic execution planning for computation graphs. Part of the EnergyIR compiler suite.

Every logically irreversible operation has a hard physical minimum energy cost of k_B·T·ln2 per erased bit (Landauer, 1961). This compiler:

  • Phase A — measure & certify: counts the erased bits of every op in a PyTorch or ThermoIR graph, attributes a certified joule floor per op, ranks irreversibility hotspots, and emits signed physics certificates (distribution-free reversibility claims + ensemble-bound floor claims).
  • Phase B — restructure & plan: removes erasures via reversible substitutions, autodiff-style uncomputation, and exact Bennett pebble scheduling under user memory/latency budgets, then emits adiabatic execution plans with provably optimal per-op time allocation (τ* ∝ √a, Sivak–Crooks-compatible shared engine). Non-adiabatic backends are refused, with the physics explanation — no false savings claims.

Install

pip install .                 # numpy-only core: worstcase mode, ThermoIR, planner
pip install ".[torch]"        # + PyTorch fx frontend (ResNet/GPT-style models)
pip install ".[dev]"          # + pytest, hypothesis, scipy (test suite)

Quickstart

thermoc erasure profile resnet50 --mode empirical --out out/   # needs [torch]
thermoc erasure certify out/erasure_report.json
thermoc erasure plan coupling_mlp --latency 10 --mem 8x        # numpy-only
thermoc erasure taxonomy --list
from thermoc.erasure import profile, rewrite, plan, Budget

rep = profile(model, example_inputs, mode="empirical")   # Landauer floor + hotspots
g2, rw = rewrite(rep.graph, Budget(mem="4x", latency="2x"))
xp = plan(g2, "phal:pb64", latency_budget_s=1.0)         # adiabatic execution plan

See MANUAL.md for the complete end-to-end guide and the physics reference card (every formula is mapped to the function that implements it and the test that pins it).

Guarantees enforced by the test suite (150 tests)

  • Glauber entropy-production ledger is exact: telescoping identity to machine precision, and the integral fluctuation theorem ⟨e^(−Δs_tot)⟩ = 1 verified against an exactly-enumerated 4×4 ensemble.
  • Bennett pebbling drops chain erasure N·b → b at the exactly predicted time/space cost (property-based).
  • Planner prediction matches an independent simulated adiabatic backend within 2%; reversible-heavy benchmarks reach ≥5× dissipation reduction at 2× latency.
  • Certificates are only ever marked valid in distribution-sound modes.

Licensing & PRO tier

OSS-first, fail-open: profiling, reports, taxonomy, and unsigned certificates are free and never require a license. The enterprise surfaces are PRO-gated with the same offline ed25519 license the EnergyIR suite uses (ENERGYIR_LICENSE env var or ~/.energyir/license; no network, no phone-home):

Surface Tier
profile (worstcase + empirical), reports, HTML, headroom free
certificates (emitted, unsigned) free
signed certificates PRO
rewrite() — R1 substitutions / R2 uncompute / R3 Bennett pebbling PRO
plan() — adiabatic execution planning PRO

A PRO license minted by the EnergyIR portal for ThermoIR unlocks erasure too — same token, same entitlement. When the energyir package is installed alongside, license verification delegates to it (energy.intelligence.licensing) so there is exactly one code path. See integration/ENERGYIR_INTEGRATION.md for the (tiny) suite-side hookup.

Provenance

This project is standalone: ThermoIR (the EnergyIR item-4 prototype) is vendored as a frozen snapshot under src/thermoc/_vendor/thermoir/; no production EnergyIR code paths are imported or modified.

License: proprietary — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thermoc_erasure-0.2.0.tar.gz (106.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thermoc_erasure-0.2.0-py3-none-any.whl (86.0 kB view details)

Uploaded Python 3

File details

Details for the file thermoc_erasure-0.2.0.tar.gz.

File metadata

  • Download URL: thermoc_erasure-0.2.0.tar.gz
  • Upload date:
  • Size: 106.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for thermoc_erasure-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1d3c6d729306805b82133646e67c2a3873b26a12433720eaa439b608e7b8cb95
MD5 28a084466e019098c64a3d7631804208
BLAKE2b-256 2e6e5ed7abaf6c485498ad322e9a165eed2c4feeb56e2474d8adef9f65b6629a

See more details on using hashes here.

File details

Details for the file thermoc_erasure-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for thermoc_erasure-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc7d72d93a9412e4fc65545872c07d6a6181c5446fd4beae17335b26ebf76c2d
MD5 7487183bcc08c28e78006cf54c6b902f
BLAKE2b-256 cb687a43a86f1d42b42a930ab632fa54d3240df3cad4a0a69185186fc6ab9259

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page