Benchmarking
Concrete Python
How to run all benchmarks?
make benchmarkHow to run a single benchmark?
TARGET=foo make benchmark-targetHow to add new benchmarks?
# import progress tracker
import py_progress_tracker as progress
# import any other dependencies
from concrete import fhe
# create a list of targets to benchmark
targets = [
{
"id": (
f"name-of-the-benchmark :: "
f"parameter1 = {foo} | parameter2 = {bar}"
),
"name": (
f"Name of the benchmark with parameter1 of {foo} and parameter2 of {bar}"
),
"parameters": {
"parameter1": foo,
"parameter2": bar,
},
}
]
# write the benchmark logic
@progress.track(targets)
def main(parameter1, parameter2):
...
# to track timings
with progress.measure(id="some-metric-ms", label="Some metric (ms)"):
# execution time of this block will be measured
...
...
# to track values
progress.measure(id="another-metric", label="Another metric", value=some_metric)
...Last updated
Was this helpful?