Skip to main content

monoprop-bench-tools

The benchmark harness behind monoprop: the pieces that are reusable outside a single benchmark run, packaged separately so scripts, notebooks and third-party comparisons can depend on them without vendoring the repository's benches/ directory.

Module What it gives you
monoprop_bench_tools.memory.cpu Exact peak-RSS measurement from the kernel's VmHWM.
monoprop_bench_tools.memory.gpu The device-side counterpart, over CUDA memory-pool counters or a CuPy allocation hook.
monoprop_bench_tools.models Builders for the benchmarked problems: a configurable random problem, a 120-mode Fermi-Hubbard model, and a 127-qubit kicked-Ising model.
monoprop_bench_tools.report Renders a run's artifacts into a side-by-side Markdown report.
monoprop_bench_tools.bmf Renders a run's artifacts into Bencher Metric Format JSON.

Install

pip install monoprop-bench-tools

GPU support

monoprop_bench_tools.memory.gpu needs CuPy, and only CuPy. Pick the extra matching your CUDA toolkit:

pip install "monoprop-bench-tools[gpu-cuda12]"   # CUDA 12.x
pip install "monoprop-bench-tools[gpu-cuda13]"   # CUDA 13.x

Pick one, not both: the two CuPy builds ship the same top-level cupy package. On a host with no system CUDA toolkit, add CuPy's bundled one with pip install "cupy-cuda12x[ctk]".

Without CuPy the module still imports, and every reading reports Method.UNAVAILABLE instead of a figure you might mistake for a real one.

Use

Measure the peak resident footprint of a block, exactly (no sampling):

from monoprop_bench_tools.memory.cpu import HighWaterMark
from monoprop_bench_tools.models import build_hubbard_problem

with HighWaterMark() as hwm:
    propagator, circuit = build_hubbard_problem()
    propagator.build_graph(circuit)

print(f"{hwm.peak_mb:.0f} MB peak, exact={hwm.exact}")

Render the artifacts of a run:

monoprop-bench-report benches/results             # writes REPORT.md
monoprop-bench-bmf benches/results ci-linux       # BMF JSON on stdout

Both read the two files a run leaves in the results directory: time-<label>.json (pytest-benchmark timings) and <label>.json (memory, operator sizes, configuration). The schema is documented in the repository's benches/results/README.md, and written by the suite in benches/conftest.py.

Scope

This package deliberately holds no benchmarks. monoprop's own suite lives in the repository's benches/ directory, because its benchmark names are the key Bencher's history is stored under and must not move with a library release.

License

Apache-2.0. See LICENSE.

Download files

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

Source Distribution

monoprop_bench_tools-0.9.0.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

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

monoprop_bench_tools-0.9.0-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file monoprop_bench_tools-0.9.0.tar.gz.

File metadata

  • Download URL: monoprop_bench_tools-0.9.0.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for monoprop_bench_tools-0.9.0.tar.gz
Algorithm Hash digest
SHA256 25a5d9a28f408e8b90ab3e2a6b1d8289afb2e3b994492975a83761cd2f552d23
MD5 6ca184f445e36ff5b46796cfaaf8f4bd
BLAKE2b-256 18cd180283ad8e1bdfc2c0594310a2b6bab3174785c8ee16bf792d0080c2b77a

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop_bench_tools-0.9.0.tar.gz:

Publisher: deploy.yml on Algorithmiq/monoprop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file monoprop_bench_tools-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for monoprop_bench_tools-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e6c570c978f33ae2719a6f0acb129c55763259c591b232755a3472a4ecafe47
MD5 8a0229f21dd2e28f6afd424bfc2a8e38
BLAKE2b-256 dc60b50fe261ec6b4fde94a31f446655b13452952d03c1474ddef86861e61936

See more details on using hashes here.

Provenance

The following attestation bundles were made for monoprop_bench_tools-0.9.0-py3-none-any.whl:

Publisher: deploy.yml on Algorithmiq/monoprop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 files

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