diff --git a/.agent/AUDITS.md b/.agent/AUDITS.md index 25b67599b4..a4b12e2640 100644 --- a/.agent/AUDITS.md +++ b/.agent/AUDITS.md @@ -79,6 +79,13 @@ changes. Serialize experiments that share a checkout or build directory. A read-only investigation does not require aborting merely because unrelated user edits exist. +For performance experiments, follow the +[benchmark experiment rules](../AGENTS.md#benchmark-experiments). Keep the +harness, raw data, plots, and reproduction steps in +`.agents/benchmarks//` and link them from the finding. Record neutral +results and regressions; an untested optimization remains a candidate, not a +measured finding. + ### What an experiment proves - A behavior-preserving variation that breaks an assertion shows a possible diff --git a/.agent/PLANS.md b/.agent/PLANS.md index 49e396203d..9100663cf6 100644 --- a/.agent/PLANS.md +++ b/.agent/PLANS.md @@ -79,6 +79,14 @@ that an old API still exists or a follow-up was resolved. Reconcile remote status only when it matters to the task; do not turn document cleanup into CI monitoring. +## Performance evidence + +For a performance change, identify the workload, baseline, correctness checks, +and relevant quality measures before implementation. Follow the +[benchmark experiment rules](../AGENTS.md#benchmark-experiments), and link the +self-contained `.agents/benchmarks//` record from the plan. Keep the +measured result and its limits in the completed decision record. + ## Validation Use repository build and test entry points. Record the focused command, the diff --git a/.agent/plans/routing-simplification.md b/.agent/plans/routing-simplification.md new file mode 100644 index 0000000000..df64c07f6a --- /dev/null +++ b/.agent/plans/routing-simplification.md @@ -0,0 +1,46 @@ +# Simplify routing without changing its heuristics + +Status: complete. + +## Outcome and decisions + +Mapping skips repair for equal layouts and updates RoutingBundle directly. +WireInfos derives membership from its inverse vectors. Graph traversal borrows +adjacency lists; unused distance-matrix and graph APIs are removed. The mapping +boundary diagnoses qubit-carrying calls, multi-block entry functions, and +invalid options. Classical calls remain supported. Documentation describes the +dense temporary workspace and its later cleanup. + +Branch convergence, voting, A* ordering, and traversal semantics are unchanged. +Payload control-flow legalization remains owned by #2162. Supported structured +regions already have single-block verifiers; the entry-function restriction is +checked by mapping. No payload capability checks were duplicated. + +The optional mapping benchmark and its data, figure, and reproduction steps are +in `.agents/benchmarks/routing/README.md`. Identical mapped-IR hashes and SWAP +counts accompany a 1.56–1.82 times speedup for unchanged branch layouts. The +routing workload is essentially unchanged. Graph measurements are synthetic. + +## Validation + +Release builds passed 104 mapping tests, 192 QCO utility tests, and 182 compiler +tests. `uvx nox -s lint` passed. Full changed-file C++ lint passed with +`uvx nox -s cpp-lint -- 91a9e0ba514af938680cdd394d6d63195872dc9a`. + +A disposable combination with #2162 at `1c5d4cc66` applied cleanly using +three-way patch application. All 100 existing mapping tests passed there. The +combined compiler suite passed 193 of 195 tests. Its two failing tests, +`PayloadControlRejectsLinearStateInGenericSCFControl` and +`PayloadControlRejectsUnstructuredCFG`, fail during parsing because they +allocate qubits outside the entry block. Both failures were reproduced with the +routing changes removed, before the mapping pass runs. Updating those #2162 +inputs is outside this PR's scope. + +The benchmark is self-contained under `.agents/benchmarks/routing/`, including +an explicit CMake hook. It builds against baseline and candidate checkouts +without source-tree edits or test targets. Relocation checks matched all 45 +outputs per revision to the recorded hashes and SWAP counts; a candidate build +with tests disabled and a normal build without the benchmark target verified +isolation. The collection and plotting scripts were exercised separately from +the preserved historical timing data. Shared benchmark rules live in +`AGENTS.md`, with links from the plan and audit guides. diff --git a/.agents/benchmarks/routing/README.md b/.agents/benchmarks/routing/README.md new file mode 100644 index 0000000000..e9860765f7 --- /dev/null +++ b/.agents/benchmarks/routing/README.md @@ -0,0 +1,89 @@ +# Routing cleanup benchmarks + +Compare upstream main `91a9e0ba514af938680cdd394d6d63195872dc9a` with the +routing changes at `c38c99cf3a8974abf1b8967bb94648f2e49e2271`. The same +benchmark source and build settings were used for both executables. The recorded +results predate the relocation of this harness; relocation validation checks +output equivalence without replacing those timing samples. + +![Before and after routing cleanup](before-after.png) + +| Workload | Size | Before (ms) | After (ms) | +| ------------------- | ------------: | ----------: | ---------: | +| Unchanged branches | 16 sites | 1.320 | 0.845 | +| Unchanged branches | 64 sites | 3.545 | 2.053 | +| Unchanged branches | 256 sites | 13.208 | 7.266 | +| Routing | 16 sites | 0.737 | 0.733 | +| Routing | 64 sites | 2.140 | 2.146 | +| Routing | 256 sites | 23.783 | 23.259 | +| Graph, 100 searches | 128 vertices | 1.044 | 0.587 | +| Graph, 100 searches | 512 vertices | 7.967 | 2.766 | +| Graph, 100 searches | 2048 vertices | 64.042 | 13.656 | + +Unchanged branches are 1.56–1.82 times faster. Routing times differ by less than +3%; this experiment does not establish an improvement for that workload. + +## Workloads and limits + +- **Unchanged branch layouts:** two active qubits, one measurement, and 32 + dynamic conditionals containing X gates, on square targets with 16, 64, and + 256 sites. No SWAPs are required. This isolates unchanged region boundaries; + it is not representative of every adaptive program. +- **Circuits that need routing:** eight active qubits and 64 CX gates with + varying partners on the same target sizes. The mapper emits 39, 50, and 53 + SWAPs respectively. This checks for a cost change when branch repair is + absent. +- **Graph traversal:** 100 cycle searches on an acyclic star with 128, 512, or + 2048 vertices. This exposes repeated adjacency copying at high degree. It is a + synthetic helper benchmark, not a mapper speedup on a typical coupling graph. + +The mapping interval includes `PassManager::run`, including its verifier. Input +construction, cloning, output verification, SWAP counting, and printing are +outside the interval. Each process discards one warmup per workload and records +five samples. Nine process pairs alternate execution order. The figure shows +medians and interquartile ranges over the 45 samples per variant and workload; +these are sample spread, not confidence intervals or 45 independent processes. +All mapped-IR hashes and SWAP counts match across variants and repetitions. The +mapper uses seed 42, one trial, one refinement iteration, and its default +lookahead and cost weights. MLIR multithreading is disabled in the benchmark. + +Measured on DGX Spark (ARM64), pinned to CPU 0, GCC 13.3.0, LLVM/MLIR 23.1.0, +release preset with IPO disabled. This is local evidence, not hosted CI or a +claim about all CPUs or circuits. Build and lint processes were stopped before +the recorded measurement run. + +## Reproduce + +All benchmark source, build integration, scripts, raw samples, and plots live in +this directory. The CMake top-level include adds the optional target after MQT +Core defines its libraries. Normal builds and CTest do not include it. No +source-tree edits or benchmark copies into the baseline are needed. + +Create separate checkouts for the baseline and candidate. For each checkout, +configure an isolated build directory with the same compiler and dependencies. +Use the **same absolute path** to this benchmark's `enable.cmake` for both: + +```sh +cmake -S /path/to/checkout -B /path/to/build -G Ninja \ + -DCMAKE_BUILD_TYPE=Release -DENABLE_IPO=OFF \ + -DBUILD_MQT_CORE_MLIR=ON -DBUILD_MQT_CORE_TESTS=OFF \ + -DBUILD_MQT_CORE_BINDINGS=OFF \ + -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=/absolute/path/to/.agents/benchmarks/routing/enable.cmake +cmake --build /path/to/build --target mqt-core-mlir-benchmark-mapping +``` + +The executable is +`/path/to/build/routing-benchmark/mqt-core-mlir-benchmark-mapping` (on +multi-configuration generators, also select and use the Release directory). + +Copy the resulting executables to distinct paths before rebuilding either +checkout. From this directory, collect and render the results: + +```sh +taskset -c 0 python3 collect.py /path/to/before-binary /path/to/after-binary +uv run plot.py +``` + +`collect.py` checks output equivalence before replacing `results.csv`. `plot.py` +declares its plotting dependency through uv script metadata. Plotting adds no +project dependency. `results.csv` preserves every recorded sample. diff --git a/.agents/benchmarks/routing/before-after.png b/.agents/benchmarks/routing/before-after.png new file mode 100644 index 0000000000..ee6f0ba2cb Binary files /dev/null and b/.agents/benchmarks/routing/before-after.png differ diff --git a/.agents/benchmarks/routing/benchmark_mapping.cpp b/.agents/benchmarks/routing/benchmark_mapping.cpp new file mode 100644 index 0000000000..0b2cc50d48 --- /dev/null +++ b/.agents/benchmarks/routing/benchmark_mapping.cpp @@ -0,0 +1,168 @@ +/* + * Copyright (c) 2023 - 2026 Chair for Design Automation, TUM + * Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH + * All rights reserved. + * + * SPDX-License-Identifier: MIT + * + * Licensed under the MIT License + */ + +#include "mlir/Compiler/Target.h" +#include "mlir/Compiler/TargetEnvironment.h" +#include "mlir/Dialect/MQT/IR/MQTDialect.h" +#include "mlir/Dialect/QCO/Builder/QCOProgramBuilder.h" +#include "mlir/Dialect/QCO/IR/QCODialect.h" +#include "mlir/Dialect/QCO/IR/QCOOps.h" +#include "mlir/Dialect/QCO/Transforms/Passes.h" +#include "mlir/Dialect/QCO/Utils/Graph.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +using namespace mlir; +using namespace mlir::qco; +using Clock = std::chrono::steady_clock; + +namespace { + +CompilerTarget grid(size_t side) { + std::vector edges; + for (size_t row = 0; row < side; ++row) { + for (size_t col = 0; col < side; ++col) { + const auto vertex = (row * side) + col; + if (col + 1 < side) { + edges.emplace_back(vertex, vertex + 1); + } + if (row + 1 < side) { + edges.emplace_back(vertex, vertex + side); + } + } + } + return llvm::cantFail(CompilerTarget::create( + side * side, CompilerTarget::Connectivity::fromCouplings(edges), + CompilerTarget::NativeOperations::unrestricted())); +} + +OwningOpRef circuit(MLIRContext& context, bool conditional) { + QCOProgramBuilder builder(&context); + builder.initialize(); + SmallVector qubits; + for (size_t i = 0; i < (conditional ? 2U : 8U); ++i) { + qubits.push_back(builder.allocQubit()); + } + if (conditional) { + auto [qubit, condition] = builder.measure(qubits[0]); + qubits[0] = qubit; + for (size_t i = 0; i < 32; ++i) { + qubits[1] = builder.qcoIf(condition, qubits[1], + [&](Value arg) { return builder.x(arg); }); + } + } else { + for (size_t layer = 0; layer < 8; ++layer) { + for (size_t i = 0; i < qubits.size(); ++i) { + const auto j = (i + 1 + (layer % 3)) % qubits.size(); + std::tie(qubits[i], qubits[j]) = builder.cx(qubits[i], qubits[j]); + } + } + } + llvm::for_each(qubits, [&](Value qubit) { builder.sink(qubit); }); + return builder.finalize(); +} + +} // namespace + +/// CSV times cover only pass execution; cloning, printing, and verification +/// are outside the timed interval. Every run reports a deterministic IR hash. +int main() { + MLIRContext context; + context.disableMultithreading(); + context.loadDialect(); + PayloadFormat format; + format.id = "benchmark.payload"; + format.version = "1.0.0"; + const auto payload = + llvm::cantFail(PayloadSpecification::create(std::move(format))); + llvm::outs() << "workload,size,sample,milliseconds,swaps,hash\n"; + for (const bool conditional : {true, false}) { + for (const size_t side : {4U, 8U, 16U}) { + auto input = circuit(context, conditional); + attachTargetEnvironment(*input, TargetEnvironment(grid(side), payload)); + if (failed(verify(*input))) { + return 1; + } + for (size_t sample = 0; sample < 6; ++sample) { + OwningOpRef moduleOp(input->clone()); + PassManager pm(&context); + pm.addPass(createMappingPass( + MappingPassOptions{.niterations = 1, .ntrials = 1, .seed = 42})); + const auto start = Clock::now(); + const auto result = pm.run(*moduleOp); + const auto elapsed = + std::chrono::duration(Clock::now() - start) + .count(); + if (failed(result) || failed(verify(*moduleOp))) { + return 1; + } + size_t swaps = 0; + moduleOp->walk([&](SWAPOp) { ++swaps; }); + std::string ir; + llvm::raw_string_ostream stream(ir); + moduleOp->print(stream); + /// Discard the first run for each workload as a warmup. + if (sample != 0) { + llvm::outs() << (conditional ? "conditional" : "routing") << ',' + << side * side << ',' << sample << ',' << elapsed << ',' + << swaps << ',' << llvm::xxh3_64bits(ir) << '\n'; + } + } + } + } + for (const size_t size : {128U, 512U, 2048U}) { + SmallVector nodes; + for (size_t i = 0; i < size; ++i) { + nodes.push_back(i); + } + Graph graph(nodes); + for (size_t i = 1; i < size; ++i) { + graph.addEdge(0, i); + } + for (size_t sample = 0; sample < 6; ++sample) { + const auto start = Clock::now(); + for (size_t iteration = 0; iteration < 100; ++iteration) { + if (graph.findCycle()) { + return 1; + } + } + const auto elapsed = + std::chrono::duration(Clock::now() - start) + .count(); + if (sample != 0) { + llvm::outs() << "graph," << size << ',' << sample << ',' << elapsed + << ",0,0\n"; + } + } + } +} diff --git a/.agents/benchmarks/routing/collect.py b/.agents/benchmarks/routing/collect.py new file mode 100644 index 0000000000..e9e4ac5693 --- /dev/null +++ b/.agents/benchmarks/routing/collect.py @@ -0,0 +1,41 @@ +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM +# Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +# /// script +# dependencies = [] +# /// +"""Collect alternating runs: python collect.py BEFORE_BINARY AFTER_BINARY.""" + +import csv +import io +import subprocess +import sys +from pathlib import Path + +before, after = sys.argv[1:] +rows = [] +for pair in range(9): + variants = (("before", before), ("after", after)) + if pair % 2: + variants = variants[::-1] + for variant, binary in variants: + # Execute the benchmark binaries explicitly selected by the caller. + result = subprocess.run([binary], check=True, capture_output=True, text=True) # ruff: ignore[subprocess-without-shell-equals-true] + rows.extend({"variant": variant, "pair": pair, **row} for row in csv.DictReader(io.StringIO(result.stdout))) + +for workload, size in sorted({(row["workload"], row["size"]) for row in rows}): + group = [row for row in rows if (row["workload"], row["size"]) == (workload, size)] + if len({(row["swaps"], row["hash"]) for row in group}) != 1: + msg = f"Mapped output changed for {workload}, size {size}" + raise RuntimeError(msg) + + +with Path(__file__).with_name("results.csv").open("w", newline="") as stream: + writer = csv.DictWriter(stream, fieldnames=list(rows[0]), lineterminator="\n") + writer.writeheader() + writer.writerows(rows) diff --git a/.agents/benchmarks/routing/enable.cmake b/.agents/benchmarks/routing/enable.cmake new file mode 100644 index 0000000000..53dc47ffec --- /dev/null +++ b/.agents/benchmarks/routing/enable.cmake @@ -0,0 +1,23 @@ +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM +# Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +include_guard(GLOBAL) + +# Add the benchmark after MQT Core has defined its libraries and build options. +function(add_routing_benchmark) + add_executable(mqt-core-mlir-benchmark-mapping EXCLUDE_FROM_ALL + "${CMAKE_CURRENT_FUNCTION_LIST_DIR}/benchmark_mapping.cpp") + target_link_libraries(mqt-core-mlir-benchmark-mapping PRIVATE MLIRQCOProgramBuilder + MLIRQCOTransforms MQTCompilerTarget) + mqt_mlir_target_use_project_options(mqt-core-mlir-benchmark-mapping) + + set_target_properties(mqt-core-mlir-benchmark-mapping + PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/routing-benchmark") +endfunction() + +cmake_language(DEFER CALL add_routing_benchmark) diff --git a/.agents/benchmarks/routing/plot.py b/.agents/benchmarks/routing/plot.py new file mode 100644 index 0000000000..acdfa3ec17 --- /dev/null +++ b/.agents/benchmarks/routing/plot.py @@ -0,0 +1,78 @@ +# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM +# Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH +# All rights reserved. +# +# SPDX-License-Identifier: MIT +# +# Licensed under the MIT License + +# /// script +# dependencies = ["matplotlib==3.10.8"] +# /// +"""Render the recorded routing benchmarks: uv run plot.py.""" + +import csv +import statistics +from pathlib import Path + +import matplotlib.pyplot as plt + +ROOT = Path(__file__).resolve().parent +with (ROOT / "results.csv").open() as stream: + rows = list(csv.DictReader(stream)) + +plt.rcParams.update({"font.family": "DejaVu Sans", "font.size": 11}) +fig, axes = plt.subplots(1, 3, figsize=(15, 5.2), layout="constrained") +fig.set_facecolor("#f6f8fc") +colors = {"before": "#75859c", "after": "#007f83"} +for ax, workload, title, subtitle in zip( + axes, + ("conditional", "routing", "graph"), + ("Unchanged branch layouts", "Circuits that need routing", "Graph traversal"), + ("2 qubits · 32 dynamic branches", "8 qubits · 64 CX gates", "Acyclic star · 100 traversals"), + strict=False, +): + sizes = sorted({int(row["size"]) for row in rows if row["workload"] == workload}) + for variant, offset in (("before", -0.19), ("after", 0.19)): + groups = [ + [ + float(r["milliseconds"]) + for r in rows + if r["workload"] == workload and int(r["size"]) == size and r["variant"] == variant + ] + for size in sizes + ] + values = [statistics.median(group) for group in groups] + quartiles = [statistics.quantiles(group, n=4) for group in groups] + bars = ax.bar( + [i + offset for i in range(len(sizes))], + values, + 0.34, + color=colors[variant], + label=variant.title(), + yerr=[ + [v - q[0] for v, q in zip(values, quartiles, strict=False)], + [q[2] - v for v, q in zip(values, quartiles, strict=False)], + ], + capsize=3, + error_kw={"linewidth": 1, "ecolor": "#263449"}, + ) + ax.bar_label(bars, labels=[f"{v:.2f}" for v in values], padding=5, fontsize=9) + ax.set_title(f"{title}\n{subtitle}", loc="left", fontsize=12, pad=16) + ax.set_xticks(range(len(sizes)), [str(size) for size in sizes]) + ax.set_xlabel("Graph vertices" if workload == "graph" else "Target sites") + ax.set_ylabel("Time (ms) · lower is better") + ax.set_ylim(0, ax.get_ylim()[1] * 1.17) + ax.spines[["top", "right", "left"]].set_visible(False) + ax.grid(axis="y", alpha=0.18) + ax.set_axisbelow(True) + ax.tick_params(axis="y", length=0) +axes[0].legend(frameon=False, loc="upper left") +fig.suptitle("Routing cleanup · before / after", fontsize=22, fontweight="bold", color="#18334a") +fig.supxlabel( + "Median and interquartile range · 9 alternating process pairs x 5 samples · fixed CPU, seed 42\n" + "Mapped IR hashes and SWAP counts match. Graph case is synthetic; it is not a mapper speedup.", + fontsize=10, + color="#405268", +) +fig.savefig(ROOT / "before-after.png", dpi=180, facecolor=fig.get_facecolor()) diff --git a/.agents/benchmarks/routing/results.csv b/.agents/benchmarks/routing/results.csv new file mode 100644 index 0000000000..498c221f97 --- /dev/null +++ b/.agents/benchmarks/routing/results.csv @@ -0,0 +1,811 @@ +variant,pair,workload,size,sample,milliseconds,swaps,hash +before,0,conditional,16,1,1.340152e+00,0,17189890484463169050 +before,0,conditional,16,2,1.309480e+00,0,17189890484463169050 +before,0,conditional,16,3,1.309864e+00,0,17189890484463169050 +before,0,conditional,16,4,1.297352e+00,0,17189890484463169050 +before,0,conditional,16,5,1.312072e+00,0,17189890484463169050 +before,0,conditional,64,1,3.498725e+00,0,5534067803201244807 +before,0,conditional,64,2,3.467797e+00,0,5534067803201244807 +before,0,conditional,64,3,3.476853e+00,0,5534067803201244807 +before,0,conditional,64,4,3.447252e+00,0,5534067803201244807 +before,0,conditional,64,5,3.467621e+00,0,5534067803201244807 +before,0,conditional,256,1,1.300168e+01,0,12517723600315101147 +before,0,conditional,256,2,1.306860e+01,0,12517723600315101147 +before,0,conditional,256,3,1.298821e+01,0,12517723600315101147 +before,0,conditional,256,4,1.299526e+01,0,12517723600315101147 +before,0,conditional,256,5,1.299230e+01,0,12517723600315101147 +before,0,routing,16,1,7.393330e-01,39,16070625545712530677 +before,0,routing,16,2,7.372200e-01,39,16070625545712530677 +before,0,routing,16,3,7.326120e-01,39,16070625545712530677 +before,0,routing,16,4,7.292360e-01,39,16070625545712530677 +before,0,routing,16,5,7.333650e-01,39,16070625545712530677 +before,0,routing,64,1,2.170077e+00,50,6989942321493789781 +before,0,routing,64,2,2.168333e+00,50,6989942321493789781 +before,0,routing,64,3,2.155997e+00,50,6989942321493789781 +before,0,routing,64,4,2.191133e+00,50,6989942321493789781 +before,0,routing,64,5,2.136844e+00,50,6989942321493789781 +before,0,routing,256,1,2.293703e+01,53,4706122369782581589 +before,0,routing,256,2,2.258450e+01,53,4706122369782581589 +before,0,routing,256,3,2.301279e+01,53,4706122369782581589 +before,0,routing,256,4,2.376637e+01,53,4706122369782581589 +before,0,routing,256,5,2.286207e+01,53,4706122369782581589 +before,0,graph,128,1,1.036630e+00,0,0 +before,0,graph,128,2,1.040214e+00,0,0 +before,0,graph,128,3,1.035238e+00,0,0 +before,0,graph,128,4,1.045575e+00,0,0 +before,0,graph,128,5,1.038102e+00,0,0 +before,0,graph,512,1,8.083504e+00,0,0 +before,0,graph,512,2,8.028000e+00,0,0 +before,0,graph,512,3,8.055024e+00,0,0 +before,0,graph,512,4,8.051743e+00,0,0 +before,0,graph,512,5,8.042048e+00,0,0 +before,0,graph,2048,1,6.366003e+01,0,0 +before,0,graph,2048,2,6.376060e+01,0,0 +before,0,graph,2048,3,6.382811e+01,0,0 +before,0,graph,2048,4,6.379993e+01,0,0 +before,0,graph,2048,5,6.353734e+01,0,0 +after,0,conditional,16,1,8.492370e-01,0,17189890484463169050 +after,0,conditional,16,2,8.341010e-01,0,17189890484463169050 +after,0,conditional,16,3,8.352530e-01,0,17189890484463169050 +after,0,conditional,16,4,8.308050e-01,0,17189890484463169050 +after,0,conditional,16,5,8.391410e-01,0,17189890484463169050 +after,0,conditional,64,1,1.976347e+00,0,5534067803201244807 +after,0,conditional,64,2,1.968828e+00,0,5534067803201244807 +after,0,conditional,64,3,1.969867e+00,0,5534067803201244807 +after,0,conditional,64,4,1.994732e+00,0,5534067803201244807 +after,0,conditional,64,5,1.980699e+00,0,5534067803201244807 +after,0,conditional,256,1,6.987273e+00,0,12517723600315101147 +after,0,conditional,256,2,7.012041e+00,0,12517723600315101147 +after,0,conditional,256,3,7.055402e+00,0,12517723600315101147 +after,0,conditional,256,4,7.008361e+00,0,12517723600315101147 +after,0,conditional,256,5,7.039673e+00,0,12517723600315101147 +after,0,routing,16,1,7.288680e-01,39,16070625545712530677 +after,0,routing,16,2,7.402280e-01,39,16070625545712530677 +after,0,routing,16,3,7.227410e-01,39,16070625545712530677 +after,0,routing,16,4,7.330770e-01,39,16070625545712530677 +after,0,routing,16,5,7.225000e-01,39,16070625545712530677 +after,0,routing,64,1,2.123469e+00,50,6989942321493789781 +after,0,routing,64,2,2.120861e+00,50,6989942321493789781 +after,0,routing,64,3,2.173549e+00,50,6989942321493789781 +after,0,routing,64,4,2.103932e+00,50,6989942321493789781 +after,0,routing,64,5,2.156060e+00,50,6989942321493789781 +after,0,routing,256,1,2.242804e+01,53,4706122369782581589 +after,0,routing,256,2,2.229767e+01,53,4706122369782581589 +after,0,routing,256,3,2.248303e+01,53,4706122369782581589 +after,0,routing,256,4,2.323459e+01,53,4706122369782581589 +after,0,routing,256,5,2.367284e+01,53,4706122369782581589 +after,0,graph,128,1,5.821630e-01,0,0 +after,0,graph,128,2,5.786430e-01,0,0 +after,0,graph,128,3,5.805320e-01,0,0 +after,0,graph,128,4,5.784350e-01,0,0 +after,0,graph,128,5,5.817800e-01,0,0 +after,0,graph,512,1,2.772368e+00,0,0 +after,0,graph,512,2,2.764177e+00,0,0 +after,0,graph,512,3,2.775392e+00,0,0 +after,0,graph,512,4,2.768817e+00,0,0 +after,0,graph,512,5,2.766752e+00,0,0 +after,0,graph,2048,1,1.371373e+01,0,0 +after,0,graph,2048,2,1.367303e+01,0,0 +after,0,graph,2048,3,1.370754e+01,0,0 +after,0,graph,2048,4,1.375866e+01,0,0 +after,0,graph,2048,5,1.366269e+01,0,0 +after,1,conditional,16,1,8.501330e-01,0,17189890484463169050 +after,1,conditional,16,2,8.312530e-01,0,17189890484463169050 +after,1,conditional,16,3,8.363880e-01,0,17189890484463169050 +after,1,conditional,16,4,8.287570e-01,0,17189890484463169050 +after,1,conditional,16,5,8.335410e-01,0,17189890484463169050 +after,1,conditional,64,1,2.002300e+00,0,5534067803201244807 +after,1,conditional,64,2,2.070285e+00,0,5534067803201244807 +after,1,conditional,64,3,2.020908e+00,0,5534067803201244807 +after,1,conditional,64,4,2.021980e+00,0,5534067803201244807 +after,1,conditional,64,5,1.975564e+00,0,5534067803201244807 +after,1,conditional,256,1,7.035418e+00,0,12517723600315101147 +after,1,conditional,256,2,6.993065e+00,0,12517723600315101147 +after,1,conditional,256,3,7.057946e+00,0,12517723600315101147 +after,1,conditional,256,4,7.010585e+00,0,12517723600315101147 +after,1,conditional,256,5,7.052362e+00,0,12517723600315101147 +after,1,routing,16,1,7.360360e-01,39,16070625545712530677 +after,1,routing,16,2,7.335880e-01,39,16070625545712530677 +after,1,routing,16,3,7.254280e-01,39,16070625545712530677 +after,1,routing,16,4,7.264210e-01,39,16070625545712530677 +after,1,routing,16,5,7.153000e-01,39,16070625545712530677 +after,1,routing,64,1,2.142973e+00,50,6989942321493789781 +after,1,routing,64,2,2.133773e+00,50,6989942321493789781 +after,1,routing,64,3,2.148109e+00,50,6989942321493789781 +after,1,routing,64,4,2.133356e+00,50,6989942321493789781 +after,1,routing,64,5,2.152956e+00,50,6989942321493789781 +after,1,routing,256,1,2.250031e+01,53,4706122369782581589 +after,1,routing,256,2,2.255482e+01,53,4706122369782581589 +after,1,routing,256,3,2.264930e+01,53,4706122369782581589 +after,1,routing,256,4,2.272969e+01,53,4706122369782581589 +after,1,routing,256,5,2.285335e+01,53,4706122369782581589 +after,1,graph,128,1,5.830910e-01,0,0 +after,1,graph,128,2,5.833000e-01,0,0 +after,1,graph,128,3,5.797950e-01,0,0 +after,1,graph,128,4,5.831230e-01,0,0 +after,1,graph,128,5,5.816040e-01,0,0 +after,1,graph,512,1,2.764384e+00,0,0 +after,1,graph,512,2,2.760673e+00,0,0 +after,1,graph,512,3,2.755760e+00,0,0 +after,1,graph,512,4,2.755777e+00,0,0 +after,1,graph,512,5,2.754896e+00,0,0 +after,1,graph,2048,1,1.367094e+01,0,0 +after,1,graph,2048,2,1.363071e+01,0,0 +after,1,graph,2048,3,1.361744e+01,0,0 +after,1,graph,2048,4,1.367384e+01,0,0 +after,1,graph,2048,5,1.363570e+01,0,0 +before,1,conditional,16,1,1.320584e+00,0,17189890484463169050 +before,1,conditional,16,2,1.312600e+00,0,17189890484463169050 +before,1,conditional,16,3,1.335272e+00,0,17189890484463169050 +before,1,conditional,16,4,1.299064e+00,0,17189890484463169050 +before,1,conditional,16,5,1.299000e+00,0,17189890484463169050 +before,1,conditional,64,1,3.460100e+00,0,5534067803201244807 +before,1,conditional,64,2,3.472293e+00,0,5534067803201244807 +before,1,conditional,64,3,3.464997e+00,0,5534067803201244807 +before,1,conditional,64,4,3.491061e+00,0,5534067803201244807 +before,1,conditional,64,5,3.488709e+00,0,5534067803201244807 +before,1,conditional,256,1,1.304128e+01,0,12517723600315101147 +before,1,conditional,256,2,1.298134e+01,0,12517723600315101147 +before,1,conditional,256,3,1.295209e+01,0,12517723600315101147 +before,1,conditional,256,4,1.292459e+01,0,12517723600315101147 +before,1,conditional,256,5,1.296627e+01,0,12517723600315101147 +before,1,routing,16,1,7.548520e-01,39,16070625545712530677 +before,1,routing,16,2,7.355240e-01,39,16070625545712530677 +before,1,routing,16,3,7.311090e-01,39,16070625545712530677 +before,1,routing,16,4,7.602280e-01,39,16070625545712530677 +before,1,routing,16,5,7.298280e-01,39,16070625545712530677 +before,1,routing,64,1,2.123021e+00,50,6989942321493789781 +before,1,routing,64,2,2.140061e+00,50,6989942321493789781 +before,1,routing,64,3,2.128540e+00,50,6989942321493789781 +before,1,routing,64,4,2.127500e+00,50,6989942321493789781 +before,1,routing,64,5,2.183181e+00,50,6989942321493789781 +before,1,routing,256,1,2.271334e+01,53,4706122369782581589 +before,1,routing,256,2,2.268252e+01,53,4706122369782581589 +before,1,routing,256,3,2.257965e+01,53,4706122369782581589 +before,1,routing,256,4,2.254996e+01,53,4706122369782581589 +before,1,routing,256,5,2.262577e+01,53,4706122369782581589 +before,1,graph,128,1,1.055271e+00,0,0 +before,1,graph,128,2,1.055574e+00,0,0 +before,1,graph,128,3,1.055542e+00,0,0 +before,1,graph,128,4,1.056822e+00,0,0 +before,1,graph,128,5,1.063623e+00,0,0 +before,1,graph,512,1,8.025839e+00,0,0 +before,1,graph,512,2,8.012272e+00,0,0 +before,1,graph,512,3,8.020752e+00,0,0 +before,1,graph,512,4,8.013183e+00,0,0 +before,1,graph,512,5,8.011600e+00,0,0 +before,1,graph,2048,1,6.381551e+01,0,0 +before,1,graph,2048,2,6.374425e+01,0,0 +before,1,graph,2048,3,6.383209e+01,0,0 +before,1,graph,2048,4,6.398310e+01,0,0 +before,1,graph,2048,5,6.356123e+01,0,0 +before,2,conditional,16,1,1.311368e+00,0,17189890484463169050 +before,2,conditional,16,2,1.308216e+00,0,17189890484463169050 +before,2,conditional,16,3,1.298376e+00,0,17189890484463169050 +before,2,conditional,16,4,1.292280e+00,0,17189890484463169050 +before,2,conditional,16,5,1.315927e+00,0,17189890484463169050 +before,2,conditional,64,1,3.516133e+00,0,5534067803201244807 +before,2,conditional,64,2,3.463557e+00,0,5534067803201244807 +before,2,conditional,64,3,3.467364e+00,0,5534067803201244807 +before,2,conditional,64,4,3.465428e+00,0,5534067803201244807 +before,2,conditional,64,5,3.457972e+00,0,5534067803201244807 +before,2,conditional,256,1,1.292595e+01,0,12517723600315101147 +before,2,conditional,256,2,1.313766e+01,0,12517723600315101147 +before,2,conditional,256,3,1.329158e+01,0,12517723600315101147 +before,2,conditional,256,4,1.316542e+01,0,12517723600315101147 +before,2,conditional,256,5,1.318270e+01,0,12517723600315101147 +before,2,routing,16,1,7.600210e-01,39,16070625545712530677 +before,2,routing,16,2,7.410450e-01,39,16070625545712530677 +before,2,routing,16,3,7.357490e-01,39,16070625545712530677 +before,2,routing,16,4,7.395890e-01,39,16070625545712530677 +before,2,routing,16,5,7.460210e-01,39,16070625545712530677 +before,2,routing,64,1,2.110636e+00,50,6989942321493789781 +before,2,routing,64,2,2.156813e+00,50,6989942321493789781 +before,2,routing,64,3,2.122141e+00,50,6989942321493789781 +before,2,routing,64,4,2.121805e+00,50,6989942321493789781 +before,2,routing,64,5,2.142317e+00,50,6989942321493789781 +before,2,routing,256,1,2.378334e+01,53,4706122369782581589 +before,2,routing,256,2,2.423226e+01,53,4706122369782581589 +before,2,routing,256,3,2.421312e+01,53,4706122369782581589 +before,2,routing,256,4,2.329428e+01,53,4706122369782581589 +before,2,routing,256,5,2.381953e+01,53,4706122369782581589 +before,2,graph,128,1,1.047526e+00,0,0 +before,2,graph,128,2,1.047398e+00,0,0 +before,2,graph,128,3,1.047974e+00,0,0 +before,2,graph,128,4,1.046886e+00,0,0 +before,2,graph,128,5,1.047398e+00,0,0 +before,2,graph,512,1,7.407964e+00,0,0 +before,2,graph,512,2,7.354556e+00,0,0 +before,2,graph,512,3,7.355772e+00,0,0 +before,2,graph,512,4,7.353163e+00,0,0 +before,2,graph,512,5,7.357116e+00,0,0 +before,2,graph,2048,1,6.340330e+01,0,0 +before,2,graph,2048,2,6.339636e+01,0,0 +before,2,graph,2048,3,6.325388e+01,0,0 +before,2,graph,2048,4,6.324548e+01,0,0 +before,2,graph,2048,5,6.330438e+01,0,0 +after,2,conditional,16,1,8.750770e-01,0,17189890484463169050 +after,2,conditional,16,2,8.446610e-01,0,17189890484463169050 +after,2,conditional,16,3,8.595090e-01,0,17189890484463169050 +after,2,conditional,16,4,8.445010e-01,0,17189890484463169050 +after,2,conditional,16,5,8.446130e-01,0,17189890484463169050 +after,2,conditional,64,1,2.040076e+00,0,5534067803201244807 +after,2,conditional,64,2,2.049916e+00,0,5534067803201244807 +after,2,conditional,64,3,2.050620e+00,0,5534067803201244807 +after,2,conditional,64,4,2.073117e+00,0,5534067803201244807 +after,2,conditional,64,5,2.060972e+00,0,5534067803201244807 +after,2,conditional,256,1,7.200747e+00,0,12517723600315101147 +after,2,conditional,256,2,7.319788e+00,0,12517723600315101147 +after,2,conditional,256,3,7.299260e+00,0,12517723600315101147 +after,2,conditional,256,4,7.339387e+00,0,12517723600315101147 +after,2,conditional,256,5,7.366859e+00,0,12517723600315101147 +after,2,routing,16,1,7.799250e-01,39,16070625545712530677 +after,2,routing,16,2,7.323400e-01,39,16070625545712530677 +after,2,routing,16,3,7.374290e-01,39,16070625545712530677 +after,2,routing,16,4,7.230600e-01,39,16070625545712530677 +after,2,routing,16,5,7.264680e-01,39,16070625545712530677 +after,2,routing,64,1,2.146940e+00,50,6989942321493789781 +after,2,routing,64,2,2.128189e+00,50,6989942321493789781 +after,2,routing,64,3,2.118253e+00,50,6989942321493789781 +after,2,routing,64,4,2.123805e+00,50,6989942321493789781 +after,2,routing,64,5,2.117869e+00,50,6989942321493789781 +after,2,routing,256,1,2.415886e+01,53,4706122369782581589 +after,2,routing,256,2,2.370486e+01,53,4706122369782581589 +after,2,routing,256,3,2.302529e+01,53,4706122369782581589 +after,2,routing,256,4,2.440581e+01,53,4706122369782581589 +after,2,routing,256,5,2.404581e+01,53,4706122369782581589 +after,2,graph,128,1,5.877950e-01,0,0 +after,2,graph,128,2,5.834760e-01,0,0 +after,2,graph,128,3,5.800990e-01,0,0 +after,2,graph,128,4,5.840200e-01,0,0 +after,2,graph,128,5,5.796510e-01,0,0 +after,2,graph,512,1,2.772305e+00,0,0 +after,2,graph,512,2,2.770672e+00,0,0 +after,2,graph,512,3,2.772849e+00,0,0 +after,2,graph,512,4,2.771152e+00,0,0 +after,2,graph,512,5,2.771681e+00,0,0 +after,2,graph,2048,1,1.370909e+01,0,0 +after,2,graph,2048,2,1.367920e+01,0,0 +after,2,graph,2048,3,1.363290e+01,0,0 +after,2,graph,2048,4,1.362663e+01,0,0 +after,2,graph,2048,5,1.361746e+01,0,0 +after,3,conditional,16,1,8.766130e-01,0,17189890484463169050 +after,3,conditional,16,2,8.632690e-01,0,17189890484463169050 +after,3,conditional,16,3,8.558610e-01,0,17189890484463169050 +after,3,conditional,16,4,8.536690e-01,0,17189890484463169050 +after,3,conditional,16,5,8.426610e-01,0,17189890484463169050 +after,3,conditional,64,1,2.044637e+00,0,5534067803201244807 +after,3,conditional,64,2,2.073117e+00,0,5534067803201244807 +after,3,conditional,64,3,2.065277e+00,0,5534067803201244807 +after,3,conditional,64,4,2.091404e+00,0,5534067803201244807 +after,3,conditional,64,5,2.080893e+00,0,5534067803201244807 +after,3,conditional,256,1,7.206523e+00,0,12517723600315101147 +after,3,conditional,256,2,7.355676e+00,0,12517723600315101147 +after,3,conditional,256,3,7.347259e+00,0,12517723600315101147 +after,3,conditional,256,4,7.336476e+00,0,12517723600315101147 +after,3,conditional,256,5,7.348956e+00,0,12517723600315101147 +after,3,routing,16,1,7.604680e-01,39,16070625545712530677 +after,3,routing,16,2,7.608520e-01,39,16070625545712530677 +after,3,routing,16,3,7.440360e-01,39,16070625545712530677 +after,3,routing,16,4,7.372520e-01,39,16070625545712530677 +after,3,routing,16,5,7.330130e-01,39,16070625545712530677 +after,3,routing,64,1,2.171756e+00,50,6989942321493789781 +after,3,routing,64,2,2.162509e+00,50,6989942321493789781 +after,3,routing,64,3,2.172205e+00,50,6989942321493789781 +after,3,routing,64,4,2.182989e+00,50,6989942321493789781 +after,3,routing,64,5,2.140717e+00,50,6989942321493789781 +after,3,routing,256,1,2.386401e+01,53,4706122369782581589 +after,3,routing,256,2,2.368848e+01,53,4706122369782581589 +after,3,routing,256,3,2.387113e+01,53,4706122369782581589 +after,3,routing,256,4,2.393414e+01,53,4706122369782581589 +after,3,routing,256,5,2.401158e+01,53,4706122369782581589 +after,3,graph,128,1,5.897480e-01,0,0 +after,3,graph,128,2,5.873470e-01,0,0 +after,3,graph,128,3,5.897800e-01,0,0 +after,3,graph,128,4,5.869310e-01,0,0 +after,3,graph,128,5,5.897480e-01,0,0 +after,3,graph,512,1,2.766832e+00,0,0 +after,3,graph,512,2,2.781857e+00,0,0 +after,3,graph,512,3,2.771856e+00,0,0 +after,3,graph,512,4,2.768688e+00,0,0 +after,3,graph,512,5,2.768177e+00,0,0 +after,3,graph,2048,1,1.365733e+01,0,0 +after,3,graph,2048,2,1.362589e+01,0,0 +after,3,graph,2048,3,1.361638e+01,0,0 +after,3,graph,2048,4,1.359496e+01,0,0 +after,3,graph,2048,5,1.359997e+01,0,0 +before,3,conditional,16,1,1.337976e+00,0,17189890484463169050 +before,3,conditional,16,2,1.327864e+00,0,17189890484463169050 +before,3,conditional,16,3,1.306328e+00,0,17189890484463169050 +before,3,conditional,16,4,1.306951e+00,0,17189890484463169050 +before,3,conditional,16,5,1.309528e+00,0,17189890484463169050 +before,3,conditional,64,1,3.544629e+00,0,5534067803201244807 +before,3,conditional,64,2,3.544485e+00,0,5534067803201244807 +before,3,conditional,64,3,3.545286e+00,0,5534067803201244807 +before,3,conditional,64,4,3.557797e+00,0,5534067803201244807 +before,3,conditional,64,5,3.559877e+00,0,5534067803201244807 +before,3,conditional,256,1,1.314952e+01,0,12517723600315101147 +before,3,conditional,256,2,1.321421e+01,0,12517723600315101147 +before,3,conditional,256,3,1.323603e+01,0,12517723600315101147 +before,3,conditional,256,4,1.333650e+01,0,12517723600315101147 +before,3,conditional,256,5,1.332938e+01,0,12517723600315101147 +before,3,routing,16,1,7.513490e-01,39,16070625545712530677 +before,3,routing,16,2,7.467410e-01,39,16070625545712530677 +before,3,routing,16,3,7.327240e-01,39,16070625545712530677 +before,3,routing,16,4,7.402280e-01,39,16070625545712530677 +before,3,routing,16,5,7.210600e-01,39,16070625545712530677 +before,3,routing,64,1,2.195373e+00,50,6989942321493789781 +before,3,routing,64,2,2.168733e+00,50,6989942321493789781 +before,3,routing,64,3,2.167965e+00,50,6989942321493789781 +before,3,routing,64,4,2.132412e+00,50,6989942321493789781 +before,3,routing,64,5,2.142125e+00,50,6989942321493789781 +before,3,routing,256,1,2.440355e+01,53,4706122369782581589 +before,3,routing,256,2,2.449149e+01,53,4706122369782581589 +before,3,routing,256,3,2.452525e+01,53,4706122369782581589 +before,3,routing,256,4,2.438827e+01,53,4706122369782581589 +before,3,routing,256,5,2.383254e+01,53,4706122369782581589 +before,3,graph,128,1,1.055254e+00,0,0 +before,3,graph,128,2,1.041798e+00,0,0 +before,3,graph,128,3,1.042599e+00,0,0 +before,3,graph,128,4,1.042150e+00,0,0 +before,3,graph,128,5,1.041894e+00,0,0 +before,3,graph,512,1,7.735166e+00,0,0 +before,3,graph,512,2,7.797071e+00,0,0 +before,3,graph,512,3,7.745502e+00,0,0 +before,3,graph,512,4,7.745854e+00,0,0 +before,3,graph,512,5,7.747550e+00,0,0 +before,3,graph,2048,1,6.411347e+01,0,0 +before,3,graph,2048,2,6.414308e+01,0,0 +before,3,graph,2048,3,6.415128e+01,0,0 +before,3,graph,2048,4,6.421011e+01,0,0 +before,3,graph,2048,5,6.423814e+01,0,0 +before,4,conditional,16,1,1.353432e+00,0,17189890484463169050 +before,4,conditional,16,2,1.324040e+00,0,17189890484463169050 +before,4,conditional,16,3,1.316776e+00,0,17189890484463169050 +before,4,conditional,16,4,1.325463e+00,0,17189890484463169050 +before,4,conditional,16,5,1.318903e+00,0,17189890484463169050 +before,4,conditional,64,1,3.609478e+00,0,5534067803201244807 +before,4,conditional,64,2,3.575269e+00,0,5534067803201244807 +before,4,conditional,64,3,3.585493e+00,0,5534067803201244807 +before,4,conditional,64,4,3.580262e+00,0,5534067803201244807 +before,4,conditional,64,5,3.583973e+00,0,5534067803201244807 +before,4,conditional,256,1,1.323616e+01,0,12517723600315101147 +before,4,conditional,256,2,1.321696e+01,0,12517723600315101147 +before,4,conditional,256,3,1.326536e+01,0,12517723600315101147 +before,4,conditional,256,4,1.330144e+01,0,12517723600315101147 +before,4,conditional,256,5,1.326805e+01,0,12517723600315101147 +before,4,routing,16,1,7.509800e-01,39,16070625545712530677 +before,4,routing,16,2,7.514610e-01,39,16070625545712530677 +before,4,routing,16,3,7.296360e-01,39,16070625545712530677 +before,4,routing,16,4,7.306280e-01,39,16070625545712530677 +before,4,routing,16,5,7.242120e-01,39,16070625545712530677 +before,4,routing,64,1,2.171469e+00,50,6989942321493789781 +before,4,routing,64,2,2.138300e+00,50,6989942321493789781 +before,4,routing,64,3,2.134589e+00,50,6989942321493789781 +before,4,routing,64,4,2.137069e+00,50,6989942321493789781 +before,4,routing,64,5,2.136845e+00,50,6989942321493789781 +before,4,routing,256,1,2.423846e+01,53,4706122369782581589 +before,4,routing,256,2,2.354486e+01,53,4706122369782581589 +before,4,routing,256,3,2.335681e+01,53,4706122369782581589 +before,4,routing,256,4,2.361737e+01,53,4706122369782581589 +before,4,routing,256,5,2.404003e+01,53,4706122369782581589 +before,4,graph,128,1,1.043687e+00,0,0 +before,4,graph,128,2,1.039062e+00,0,0 +before,4,graph,128,3,1.039766e+00,0,0 +before,4,graph,128,4,1.038070e+00,0,0 +before,4,graph,128,5,1.038070e+00,0,0 +before,4,graph,512,1,8.069872e+00,0,0 +before,4,graph,512,2,8.067455e+00,0,0 +before,4,graph,512,3,8.064000e+00,0,0 +before,4,graph,512,4,8.073328e+00,0,0 +before,4,graph,512,5,8.057408e+00,0,0 +before,4,graph,2048,1,6.399382e+01,0,0 +before,4,graph,2048,2,6.407520e+01,0,0 +before,4,graph,2048,3,6.400340e+01,0,0 +before,4,graph,2048,4,6.404246e+01,0,0 +before,4,graph,2048,5,6.407012e+01,0,0 +after,4,conditional,16,1,8.792530e-01,0,17189890484463169050 +after,4,conditional,16,2,8.467730e-01,0,17189890484463169050 +after,4,conditional,16,3,8.522770e-01,0,17189890484463169050 +after,4,conditional,16,4,8.458450e-01,0,17189890484463169050 +after,4,conditional,16,5,8.366930e-01,0,17189890484463169050 +after,4,conditional,64,1,2.002476e+00,0,5534067803201244807 +after,4,conditional,64,2,2.021100e+00,0,5534067803201244807 +after,4,conditional,64,3,2.013500e+00,0,5534067803201244807 +after,4,conditional,64,4,2.025164e+00,0,5534067803201244807 +after,4,conditional,64,5,2.070668e+00,0,5534067803201244807 +after,4,conditional,256,1,7.214539e+00,0,12517723600315101147 +after,4,conditional,256,2,7.301131e+00,0,12517723600315101147 +after,4,conditional,256,3,7.315995e+00,0,12517723600315101147 +after,4,conditional,256,4,7.355772e+00,0,12517723600315101147 +after,4,conditional,256,5,7.340908e+00,0,12517723600315101147 +after,4,routing,16,1,7.540850e-01,39,16070625545712530677 +after,4,routing,16,2,7.307090e-01,39,16070625545712530677 +after,4,routing,16,3,7.324850e-01,39,16070625545712530677 +after,4,routing,16,4,7.206920e-01,39,16070625545712530677 +after,4,routing,16,5,7.388520e-01,39,16070625545712530677 +after,4,routing,64,1,2.154604e+00,50,6989942321493789781 +after,4,routing,64,2,2.149197e+00,50,6989942321493789781 +after,4,routing,64,3,2.169244e+00,50,6989942321493789781 +after,4,routing,64,4,2.149453e+00,50,6989942321493789781 +after,4,routing,64,5,2.134828e+00,50,6989942321493789781 +after,4,routing,256,1,2.373843e+01,53,4706122369782581589 +after,4,routing,256,2,2.308863e+01,53,4706122369782581589 +after,4,routing,256,3,2.353313e+01,53,4706122369782581589 +after,4,routing,256,4,2.307047e+01,53,4706122369782581589 +after,4,routing,256,5,2.295367e+01,53,4706122369782581589 +after,4,graph,128,1,5.915070e-01,0,0 +after,4,graph,128,2,5.985960e-01,0,0 +after,4,graph,128,3,5.836030e-01,0,0 +after,4,graph,128,4,5.857800e-01,0,0 +after,4,graph,128,5,5.817630e-01,0,0 +after,4,graph,512,1,2.763777e+00,0,0 +after,4,graph,512,2,2.755904e+00,0,0 +after,4,graph,512,3,2.755024e+00,0,0 +after,4,graph,512,4,2.752545e+00,0,0 +after,4,graph,512,5,2.757216e+00,0,0 +after,4,graph,2048,1,1.360366e+01,0,0 +after,4,graph,2048,2,1.356762e+01,0,0 +after,4,graph,2048,3,1.355797e+01,0,0 +after,4,graph,2048,4,1.355790e+01,0,0 +after,4,graph,2048,5,1.356413e+01,0,0 +after,5,conditional,16,1,8.710930e-01,0,17189890484463169050 +after,5,conditional,16,2,8.566290e-01,0,17189890484463169050 +after,5,conditional,16,3,8.389970e-01,0,17189890484463169050 +after,5,conditional,16,4,8.403250e-01,0,17189890484463169050 +after,5,conditional,16,5,8.478610e-01,0,17189890484463169050 +after,5,conditional,64,1,2.052780e+00,0,5534067803201244807 +after,5,conditional,64,2,2.094765e+00,0,5534067803201244807 +after,5,conditional,64,3,2.096108e+00,0,5534067803201244807 +after,5,conditional,64,4,2.076653e+00,0,5534067803201244807 +after,5,conditional,64,5,2.057564e+00,0,5534067803201244807 +after,5,conditional,256,1,7.150043e+00,0,12517723600315101147 +after,5,conditional,256,2,7.354348e+00,0,12517723600315101147 +after,5,conditional,256,3,7.337691e+00,0,12517723600315101147 +after,5,conditional,256,4,7.352988e+00,0,12517723600315101147 +after,5,conditional,256,5,7.398604e+00,0,12517723600315101147 +after,5,routing,16,1,7.551090e-01,39,16070625545712530677 +after,5,routing,16,2,7.472050e-01,39,16070625545712530677 +after,5,routing,16,3,7.321330e-01,39,16070625545712530677 +after,5,routing,16,4,7.410450e-01,39,16070625545712530677 +after,5,routing,16,5,7.256840e-01,39,16070625545712530677 +after,5,routing,64,1,2.178445e+00,50,6989942321493789781 +after,5,routing,64,2,2.145805e+00,50,6989942321493789781 +after,5,routing,64,3,2.136268e+00,50,6989942321493789781 +after,5,routing,64,4,2.118205e+00,50,6989942321493789781 +after,5,routing,64,5,2.131693e+00,50,6989942321493789781 +after,5,routing,256,1,2.291348e+01,53,4706122369782581589 +after,5,routing,256,2,2.251340e+01,53,4706122369782581589 +after,5,routing,256,3,2.356123e+01,53,4706122369782581589 +after,5,routing,256,4,2.325862e+01,53,4706122369782581589 +after,5,routing,256,5,2.316215e+01,53,4706122369782581589 +after,5,graph,128,1,5.846760e-01,0,0 +after,5,graph,128,2,5.865950e-01,0,0 +after,5,graph,128,3,6.014920e-01,0,0 +after,5,graph,128,4,5.827870e-01,0,0 +after,5,graph,128,5,5.929800e-01,0,0 +after,5,graph,512,1,2.760928e+00,0,0 +after,5,graph,512,2,2.762065e+00,0,0 +after,5,graph,512,3,2.761168e+00,0,0 +after,5,graph,512,4,2.761904e+00,0,0 +after,5,graph,512,5,2.757841e+00,0,0 +after,5,graph,2048,1,1.376055e+01,0,0 +after,5,graph,2048,2,1.376827e+01,0,0 +after,5,graph,2048,3,1.374362e+01,0,0 +after,5,graph,2048,4,1.379226e+01,0,0 +after,5,graph,2048,5,1.373298e+01,0,0 +before,5,conditional,16,1,1.337656e+00,0,17189890484463169050 +before,5,conditional,16,2,1.321448e+00,0,17189890484463169050 +before,5,conditional,16,3,1.321576e+00,0,17189890484463169050 +before,5,conditional,16,4,1.311784e+00,0,17189890484463169050 +before,5,conditional,16,5,1.347112e+00,0,17189890484463169050 +before,5,conditional,64,1,3.602133e+00,0,5534067803201244807 +before,5,conditional,64,2,3.567445e+00,0,5534067803201244807 +before,5,conditional,64,3,3.550325e+00,0,5534067803201244807 +before,5,conditional,64,4,3.572677e+00,0,5534067803201244807 +before,5,conditional,64,5,3.585141e+00,0,5534067803201244807 +before,5,conditional,256,1,1.325883e+01,0,12517723600315101147 +before,5,conditional,256,2,1.321573e+01,0,12517723600315101147 +before,5,conditional,256,3,1.326851e+01,0,12517723600315101147 +before,5,conditional,256,4,1.320801e+01,0,12517723600315101147 +before,5,conditional,256,5,1.320579e+01,0,12517723600315101147 +before,5,routing,16,1,7.616850e-01,39,16070625545712530677 +before,5,routing,16,2,7.428840e-01,39,16070625545712530677 +before,5,routing,16,3,7.432520e-01,39,16070625545712530677 +before,5,routing,16,4,7.355720e-01,39,16070625545712530677 +before,5,routing,16,5,7.242600e-01,39,16070625545712530677 +before,5,routing,64,1,2.129101e+00,50,6989942321493789781 +before,5,routing,64,2,2.153756e+00,50,6989942321493789781 +before,5,routing,64,3,2.135004e+00,50,6989942321493789781 +before,5,routing,64,4,2.113261e+00,50,6989942321493789781 +before,5,routing,64,5,2.164141e+00,50,6989942321493789781 +before,5,routing,256,1,2.425051e+01,53,4706122369782581589 +before,5,routing,256,2,2.375843e+01,53,4706122369782581589 +before,5,routing,256,3,2.412704e+01,53,4706122369782581589 +before,5,routing,256,4,2.349067e+01,53,4706122369782581589 +before,5,routing,256,5,2.371611e+01,53,4706122369782581589 +before,5,graph,128,1,1.050647e+00,0,0 +before,5,graph,128,2,1.061654e+00,0,0 +before,5,graph,128,3,1.048742e+00,0,0 +before,5,graph,128,4,1.049110e+00,0,0 +before,5,graph,128,5,1.050231e+00,0,0 +before,5,graph,512,1,7.980127e+00,0,0 +before,5,graph,512,2,7.967791e+00,0,0 +before,5,graph,512,3,7.954784e+00,0,0 +before,5,graph,512,4,7.967167e+00,0,0 +before,5,graph,512,5,7.964623e+00,0,0 +before,5,graph,2048,1,6.765680e+01,0,0 +before,5,graph,2048,2,6.764138e+01,0,0 +before,5,graph,2048,3,6.762527e+01,0,0 +before,5,graph,2048,4,6.753306e+01,0,0 +before,5,graph,2048,5,6.764018e+01,0,0 +before,6,conditional,16,1,1.340424e+00,0,17189890484463169050 +before,6,conditional,16,2,1.324472e+00,0,17189890484463169050 +before,6,conditional,16,3,1.342264e+00,0,17189890484463169050 +before,6,conditional,16,4,1.311784e+00,0,17189890484463169050 +before,6,conditional,16,5,1.303320e+00,0,17189890484463169050 +before,6,conditional,64,1,3.558021e+00,0,5534067803201244807 +before,6,conditional,64,2,3.558261e+00,0,5534067803201244807 +before,6,conditional,64,3,3.598693e+00,0,5534067803201244807 +before,6,conditional,64,4,3.573894e+00,0,5534067803201244807 +before,6,conditional,64,5,3.578597e+00,0,5534067803201244807 +before,6,conditional,256,1,1.313899e+01,0,12517723600315101147 +before,6,conditional,256,2,1.316576e+01,0,12517723600315101147 +before,6,conditional,256,3,1.320525e+01,0,12517723600315101147 +before,6,conditional,256,4,1.335163e+01,0,12517723600315101147 +before,6,conditional,256,5,1.326822e+01,0,12517723600315101147 +before,6,routing,16,1,7.531080e-01,39,16070625545712530677 +before,6,routing,16,2,7.426120e-01,39,16070625545712530677 +before,6,routing,16,3,7.383240e-01,39,16070625545712530677 +before,6,routing,16,4,7.240850e-01,39,16070625545712530677 +before,6,routing,16,5,7.395240e-01,39,16070625545712530677 +before,6,routing,64,1,2.135421e+00,50,6989942321493789781 +before,6,routing,64,2,2.113997e+00,50,6989942321493789781 +before,6,routing,64,3,2.162253e+00,50,6989942321493789781 +before,6,routing,64,4,2.120476e+00,50,6989942321493789781 +before,6,routing,64,5,2.129197e+00,50,6989942321493789781 +before,6,routing,256,1,2.410171e+01,53,4706122369782581589 +before,6,routing,256,2,2.337457e+01,53,4706122369782581589 +before,6,routing,256,3,2.428805e+01,53,4706122369782581589 +before,6,routing,256,4,2.329342e+01,53,4706122369782581589 +before,6,routing,256,5,2.399003e+01,53,4706122369782581589 +before,6,graph,128,1,1.056326e+00,0,0 +before,6,graph,128,2,1.038054e+00,0,0 +before,6,graph,128,3,1.035623e+00,0,0 +before,6,graph,128,4,1.036742e+00,0,0 +before,6,graph,128,5,1.035334e+00,0,0 +before,6,graph,512,1,8.069440e+00,0,0 +before,6,graph,512,2,8.069280e+00,0,0 +before,6,graph,512,3,8.060112e+00,0,0 +before,6,graph,512,4,8.073504e+00,0,0 +before,6,graph,512,5,8.066336e+00,0,0 +before,6,graph,2048,1,6.772909e+01,0,0 +before,6,graph,2048,2,6.769915e+01,0,0 +before,6,graph,2048,3,6.771519e+01,0,0 +before,6,graph,2048,4,6.780418e+01,0,0 +before,6,graph,2048,5,6.760221e+01,0,0 +after,6,conditional,16,1,8.664210e-01,0,17189890484463169050 +after,6,conditional,16,2,8.560050e-01,0,17189890484463169050 +after,6,conditional,16,3,8.332850e-01,0,17189890484463169050 +after,6,conditional,16,4,8.301970e-01,0,17189890484463169050 +after,6,conditional,16,5,8.354130e-01,0,17189890484463169050 +after,6,conditional,64,1,2.045260e+00,0,5534067803201244807 +after,6,conditional,64,2,2.052204e+00,0,5534067803201244807 +after,6,conditional,64,3,2.064684e+00,0,5534067803201244807 +after,6,conditional,64,4,2.062621e+00,0,5534067803201244807 +after,6,conditional,64,5,2.082876e+00,0,5534067803201244807 +after,6,conditional,256,1,7.126186e+00,0,12517723600315101147 +after,6,conditional,256,2,7.224683e+00,0,12517723600315101147 +after,6,conditional,256,3,7.265771e+00,0,12517723600315101147 +after,6,conditional,256,4,7.315915e+00,0,12517723600315101147 +after,6,conditional,256,5,7.270587e+00,0,12517723600315101147 +after,6,routing,16,1,7.433480e-01,39,16070625545712530677 +after,6,routing,16,2,7.257480e-01,39,16070625545712530677 +after,6,routing,16,3,7.321330e-01,39,16070625545712530677 +after,6,routing,16,4,7.130120e-01,39,16070625545712530677 +after,6,routing,16,5,7.223720e-01,39,16070625545712530677 +after,6,routing,64,1,2.114717e+00,50,6989942321493789781 +after,6,routing,64,2,2.124205e+00,50,6989942321493789781 +after,6,routing,64,3,2.123021e+00,50,6989942321493789781 +after,6,routing,64,4,2.133085e+00,50,6989942321493789781 +after,6,routing,64,5,2.113501e+00,50,6989942321493789781 +after,6,routing,256,1,2.316545e+01,53,4706122369782581589 +after,6,routing,256,2,2.306028e+01,53,4706122369782581589 +after,6,routing,256,3,2.332209e+01,53,4706122369782581589 +after,6,routing,256,4,2.277548e+01,53,4706122369782581589 +after,6,routing,256,5,2.318337e+01,53,4706122369782581589 +after,6,graph,128,1,6.036840e-01,0,0 +after,6,graph,128,2,5.995880e-01,0,0 +after,6,graph,128,3,6.025790e-01,0,0 +after,6,graph,128,4,6.024520e-01,0,0 +after,6,graph,128,5,6.000990e-01,0,0 +after,6,graph,512,1,2.772641e+00,0,0 +after,6,graph,512,2,2.769904e+00,0,0 +after,6,graph,512,3,2.765137e+00,0,0 +after,6,graph,512,4,2.768416e+00,0,0 +after,6,graph,512,5,2.781473e+00,0,0 +after,6,graph,2048,1,1.374325e+01,0,0 +after,6,graph,2048,2,1.373176e+01,0,0 +after,6,graph,2048,3,1.371941e+01,0,0 +after,6,graph,2048,4,1.372325e+01,0,0 +after,6,graph,2048,5,1.370938e+01,0,0 +after,7,conditional,16,1,8.550770e-01,0,17189890484463169050 +after,7,conditional,16,2,8.425330e-01,0,17189890484463169050 +after,7,conditional,16,3,8.384050e-01,0,17189890484463169050 +after,7,conditional,16,4,8.403730e-01,0,17189890484463169050 +after,7,conditional,16,5,8.297810e-01,0,17189890484463169050 +after,7,conditional,64,1,2.110892e+00,0,5534067803201244807 +after,7,conditional,64,2,2.047244e+00,0,5534067803201244807 +after,7,conditional,64,3,2.035708e+00,0,5534067803201244807 +after,7,conditional,64,4,2.035372e+00,0,5534067803201244807 +after,7,conditional,64,5,2.062652e+00,0,5534067803201244807 +after,7,conditional,256,1,7.193354e+00,0,12517723600315101147 +after,7,conditional,256,2,7.167771e+00,0,12517723600315101147 +after,7,conditional,256,3,7.203355e+00,0,12517723600315101147 +after,7,conditional,256,4,7.171851e+00,0,12517723600315101147 +after,7,conditional,256,5,7.199547e+00,0,12517723600315101147 +after,7,routing,16,1,7.493480e-01,39,16070625545712530677 +after,7,routing,16,2,7.537960e-01,39,16070625545712530677 +after,7,routing,16,3,7.389640e-01,39,16070625545712530677 +after,7,routing,16,4,7.432040e-01,39,16070625545712530677 +after,7,routing,16,5,7.317160e-01,39,16070625545712530677 +after,7,routing,64,1,2.128236e+00,50,6989942321493789781 +after,7,routing,64,2,2.146493e+00,50,6989942321493789781 +after,7,routing,64,3,2.181421e+00,50,6989942321493789781 +after,7,routing,64,4,2.153389e+00,50,6989942321493789781 +after,7,routing,64,5,2.156653e+00,50,6989942321493789781 +after,7,routing,256,1,2.358542e+01,53,4706122369782581589 +after,7,routing,256,2,2.372440e+01,53,4706122369782581589 +after,7,routing,256,3,2.354459e+01,53,4706122369782581589 +after,7,routing,256,4,2.401120e+01,53,4706122369782581589 +after,7,routing,256,5,2.449391e+01,53,4706122369782581589 +after,7,graph,128,1,5.876200e-01,0,0 +after,7,graph,128,2,5.853470e-01,0,0 +after,7,graph,128,3,5.881640e-01,0,0 +after,7,graph,128,4,5.852350e-01,0,0 +after,7,graph,128,5,5.884840e-01,0,0 +after,7,graph,512,1,2.783408e+00,0,0 +after,7,graph,512,2,2.750353e+00,0,0 +after,7,graph,512,3,2.751056e+00,0,0 +after,7,graph,512,4,2.751921e+00,0,0 +after,7,graph,512,5,2.751344e+00,0,0 +after,7,graph,2048,1,1.364688e+01,0,0 +after,7,graph,2048,2,1.364687e+01,0,0 +after,7,graph,2048,3,1.363078e+01,0,0 +after,7,graph,2048,4,1.360966e+01,0,0 +after,7,graph,2048,5,1.360384e+01,0,0 +before,7,conditional,16,1,1.336760e+00,0,17189890484463169050 +before,7,conditional,16,2,1.330008e+00,0,17189890484463169050 +before,7,conditional,16,3,1.336680e+00,0,17189890484463169050 +before,7,conditional,16,4,1.307879e+00,0,17189890484463169050 +before,7,conditional,16,5,1.307784e+00,0,17189890484463169050 +before,7,conditional,64,1,3.578981e+00,0,5534067803201244807 +before,7,conditional,64,2,3.554853e+00,0,5534067803201244807 +before,7,conditional,64,3,3.583926e+00,0,5534067803201244807 +before,7,conditional,64,4,3.576581e+00,0,5534067803201244807 +before,7,conditional,64,5,3.580422e+00,0,5534067803201244807 +before,7,conditional,256,1,1.336214e+01,0,12517723600315101147 +before,7,conditional,256,2,1.337782e+01,0,12517723600315101147 +before,7,conditional,256,3,1.343814e+01,0,12517723600315101147 +before,7,conditional,256,4,1.331555e+01,0,12517723600315101147 +before,7,conditional,256,5,1.339382e+01,0,12517723600315101147 +before,7,routing,16,1,7.686450e-01,39,16070625545712530677 +before,7,routing,16,2,7.381810e-01,39,16070625545712530677 +before,7,routing,16,3,7.359090e-01,39,16070625545712530677 +before,7,routing,16,4,7.320530e-01,39,16070625545712530677 +before,7,routing,16,5,7.367880e-01,39,16070625545712530677 +before,7,routing,64,1,2.179917e+00,50,6989942321493789781 +before,7,routing,64,2,2.161869e+00,50,6989942321493789781 +before,7,routing,64,3,2.175853e+00,50,6989942321493789781 +before,7,routing,64,4,2.186781e+00,50,6989942321493789781 +before,7,routing,64,5,2.173324e+00,50,6989942321493789781 +before,7,routing,256,1,2.389361e+01,53,4706122369782581589 +before,7,routing,256,2,2.458610e+01,53,4706122369782581589 +before,7,routing,256,3,2.411501e+01,53,4706122369782581589 +before,7,routing,256,4,2.306423e+01,53,4706122369782581589 +before,7,routing,256,5,2.425037e+01,53,4706122369782581589 +before,7,graph,128,1,1.045222e+00,0,0 +before,7,graph,128,2,1.041478e+00,0,0 +before,7,graph,128,3,1.044374e+00,0,0 +before,7,graph,128,4,1.048342e+00,0,0 +before,7,graph,128,5,1.043895e+00,0,0 +before,7,graph,512,1,7.107051e+00,0,0 +before,7,graph,512,2,7.142826e+00,0,0 +before,7,graph,512,3,7.102298e+00,0,0 +before,7,graph,512,4,7.106810e+00,0,0 +before,7,graph,512,5,7.100379e+00,0,0 +before,7,graph,2048,1,6.331751e+01,0,0 +before,7,graph,2048,2,6.327890e+01,0,0 +before,7,graph,2048,3,6.338170e+01,0,0 +before,7,graph,2048,4,6.319262e+01,0,0 +before,7,graph,2048,5,6.322039e+01,0,0 +before,8,conditional,16,1,1.325432e+00,0,17189890484463169050 +before,8,conditional,16,2,1.319976e+00,0,17189890484463169050 +before,8,conditional,16,3,1.331464e+00,0,17189890484463169050 +before,8,conditional,16,4,1.350024e+00,0,17189890484463169050 +before,8,conditional,16,5,1.326280e+00,0,17189890484463169050 +before,8,conditional,64,1,3.526005e+00,0,5534067803201244807 +before,8,conditional,64,2,3.515940e+00,0,5534067803201244807 +before,8,conditional,64,3,3.544918e+00,0,5534067803201244807 +before,8,conditional,64,4,3.523893e+00,0,5534067803201244807 +before,8,conditional,64,5,3.523397e+00,0,5534067803201244807 +before,8,conditional,256,1,1.310019e+01,0,12517723600315101147 +before,8,conditional,256,2,1.314395e+01,0,12517723600315101147 +before,8,conditional,256,3,1.324213e+01,0,12517723600315101147 +before,8,conditional,256,4,1.323078e+01,0,12517723600315101147 +before,8,conditional,256,5,1.307152e+01,0,12517723600315101147 +before,8,routing,16,1,7.357960e-01,39,16070625545712530677 +before,8,routing,16,2,7.810450e-01,39,16070625545712530677 +before,8,routing,16,3,7.175400e-01,39,16070625545712530677 +before,8,routing,16,4,7.343090e-01,39,16070625545712530677 +before,8,routing,16,5,7.218600e-01,39,16070625545712530677 +before,8,routing,64,1,2.155852e+00,50,6989942321493789781 +before,8,routing,64,2,2.121820e+00,50,6989942321493789781 +before,8,routing,64,3,2.156828e+00,50,6989942321493789781 +before,8,routing,64,4,2.136557e+00,50,6989942321493789781 +before,8,routing,64,5,2.132749e+00,50,6989942321493789781 +before,8,routing,256,1,2.358275e+01,53,4706122369782581589 +before,8,routing,256,2,2.404870e+01,53,4706122369782581589 +before,8,routing,256,3,2.455579e+01,53,4706122369782581589 +before,8,routing,256,4,2.359651e+01,53,4706122369782581589 +before,8,routing,256,5,2.382635e+01,53,4706122369782581589 +before,8,graph,128,1,1.044566e+00,0,0 +before,8,graph,128,2,1.035222e+00,0,0 +before,8,graph,128,3,1.037622e+00,0,0 +before,8,graph,128,4,1.034390e+00,0,0 +before,8,graph,128,5,1.035030e+00,0,0 +before,8,graph,512,1,7.824175e+00,0,0 +before,8,graph,512,2,7.796750e+00,0,0 +before,8,graph,512,3,7.782062e+00,0,0 +before,8,graph,512,4,7.773886e+00,0,0 +before,8,graph,512,5,7.771518e+00,0,0 +before,8,graph,2048,1,6.798407e+01,0,0 +before,8,graph,2048,2,6.799344e+01,0,0 +before,8,graph,2048,3,6.796472e+01,0,0 +before,8,graph,2048,4,6.796799e+01,0,0 +before,8,graph,2048,5,6.782314e+01,0,0 +after,8,conditional,16,1,8.749010e-01,0,17189890484463169050 +after,8,conditional,16,2,8.521330e-01,0,17189890484463169050 +after,8,conditional,16,3,8.483090e-01,0,17189890484463169050 +after,8,conditional,16,4,8.729490e-01,0,17189890484463169050 +after,8,conditional,16,5,8.291250e-01,0,17189890484463169050 +after,8,conditional,64,1,2.077420e+00,0,5534067803201244807 +after,8,conditional,64,2,2.064381e+00,0,5534067803201244807 +after,8,conditional,64,3,2.054332e+00,0,5534067803201244807 +after,8,conditional,64,4,2.075437e+00,0,5534067803201244807 +after,8,conditional,64,5,2.076652e+00,0,5534067803201244807 +after,8,conditional,256,1,7.217819e+00,0,12517723600315101147 +after,8,conditional,256,2,7.324252e+00,0,12517723600315101147 +after,8,conditional,256,3,7.407388e+00,0,12517723600315101147 +after,8,conditional,256,4,7.342475e+00,0,12517723600315101147 +after,8,conditional,256,5,7.406444e+00,0,12517723600315101147 +after,8,routing,16,1,7.636040e-01,39,16070625545712530677 +after,8,routing,16,2,7.383880e-01,39,16070625545712530677 +after,8,routing,16,3,7.427400e-01,39,16070625545712530677 +after,8,routing,16,4,7.276360e-01,39,16070625545712530677 +after,8,routing,16,5,7.305810e-01,39,16070625545712530677 +after,8,routing,64,1,2.178556e+00,50,6989942321493789781 +after,8,routing,64,2,2.168125e+00,50,6989942321493789781 +after,8,routing,64,3,2.159869e+00,50,6989942321493789781 +after,8,routing,64,4,2.150061e+00,50,6989942321493789781 +after,8,routing,64,5,2.143261e+00,50,6989942321493789781 +after,8,routing,256,1,2.341676e+01,53,4706122369782581589 +after,8,routing,256,2,2.385213e+01,53,4706122369782581589 +after,8,routing,256,3,2.318926e+01,53,4706122369782581589 +after,8,routing,256,4,2.270564e+01,53,4706122369782581589 +after,8,routing,256,5,2.383584e+01,53,4706122369782581589 +after,8,graph,128,1,5.929310e-01,0,0 +after,8,graph,128,2,5.868030e-01,0,0 +after,8,graph,128,3,5.916360e-01,0,0 +after,8,graph,128,4,5.886270e-01,0,0 +after,8,graph,128,5,5.856840e-01,0,0 +after,8,graph,512,1,2.795873e+00,0,0 +after,8,graph,512,2,2.769696e+00,0,0 +after,8,graph,512,3,2.762881e+00,0,0 +after,8,graph,512,4,2.765712e+00,0,0 +after,8,graph,512,5,2.765537e+00,0,0 +after,8,graph,2048,1,1.366250e+01,0,0 +after,8,graph,2048,2,1.362906e+01,0,0 +after,8,graph,2048,3,1.365571e+01,0,0 +after,8,graph,2048,4,1.366805e+01,0,0 +after,8,graph,2048,5,1.361725e+01,0,0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f4c5f2248..7f39398cc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -139,7 +139,7 @@ jobs: cpp-linter-extra-args: "-std=c++20 -Wunused-template" # Vendored third-party headers are checked upstream and are not maintained # according to MQT Core's clang-tidy configuration. - cpp-linter-ignore-extra: "vendor/**" + cpp-linter-ignore-extra: "vendor/**|.agents/benchmarks/**" setup-mlir: true llvm-version: 23.1.0 permissions: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eb4c958f26..68b7fce5dc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,8 @@ ci: autofix_commit_msg: "🎨 pre-commit fixes" skip: [ty] +exclude: ^\.agents/benchmarks/ + repos: ## Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/AGENTS.md b/AGENTS.md index 893b991e54..64f5fd1129 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -205,6 +205,17 @@ Use Google-style Python docstrings. Prefer fixing diagnostics from `ruff` and pass. Rerun affected checks and required gates, then stop unless a concrete remaining risk warrants broader validation. +## Benchmark experiments + +Keep one-off benchmarks in `.agents/benchmarks//`, outside normal build +and test targets. Include the harness, reproduction commands, exact revisions, +environment, raw measurements, and generated before/after plots. + +Run matched comparisons; check correctness and output quality alongside speed. +Report sample spread, regressions, and limits. Keep old results tied to their +measured revisions. Exclude these folders from routine lint; validate +experiments explicitly. Durable regression tests belong in the test tree. + ## ExecPlans When writing complex features or significant refactors, use an ExecPlan (as diff --git a/mlir/include/mlir/Dialect/QCO/Transforms/Passes.td b/mlir/include/mlir/Dialect/QCO/Transforms/Passes.td index 10e9f66175..5b457f23aa 100644 --- a/mlir/include/mlir/Dialect/QCO/Transforms/Passes.td +++ b/mlir/include/mlir/Dialect/QCO/Transforms/Passes.td @@ -132,8 +132,9 @@ def MappingPass : Pass<"place-and-route", "mlir::ModuleOp"> { First, the pass assigns static qubits to the dynamically allocated ones by creating an initial dynamic-to-static mapping, which is referred to as the initial layout. The layout covers the - complete target virtually, while only program qubits and vacant sites used - as routing workspace are materialized. Then, the pass traverses the circuit + complete target. The pass materializes all target sites as routing workspace + and carries them through structured control flow. Cleanup after mapping + removes unused sites. The pass traverses the circuit and inserts `qco.swap` operations to ensure that all two-qubit operations are executable on the target architecture, a process known as routing. @@ -168,7 +169,7 @@ def MappingPass : Pass<"place-and-route", "mlir::ModuleOp"> { let options = [Option<"nlookahead", "nlookahead", "std::size_t", "1", "The number of lookahead steps.">, Option<"alpha", "alpha", "float", "1.0F", - "The alpha factor in the cost function. Must be > 0.">, + "The alpha cost factor. Must be finite and > 0.">, Option<"lambda", "lambda", "float", "0.5F", "The lambda factor in the cost function.">, Option<"niterations", "niterations", "std::size_t", "1", diff --git a/mlir/include/mlir/Dialect/QCO/Utils/Graph.h b/mlir/include/mlir/Dialect/QCO/Utils/Graph.h index 6cd25c8144..6de747b660 100644 --- a/mlir/include/mlir/Dialect/QCO/Utils/Graph.h +++ b/mlir/include/mlir/Dialect/QCO/Utils/Graph.h @@ -11,13 +11,11 @@ #pragma once #include -#include +#include +#include #include -#include -#include #include -#include #include #include #include @@ -27,40 +25,11 @@ namespace mlir::qco { /// A directed graph. class Graph { public: - class DistanceMatrix { - SmallVector data_; - size_t n_{}; - - public: - /// Initialize distance matrix, where all entries are filled with `v`. - explicit DistanceMatrix(size_t n, size_t v) : n_(n), data_(n * n, v) {} - - /// Return the i-th row. - MutableArrayRef operator[](size_t i) { - assert(i < n_ && "row index out of bounds"); - return MutableArrayRef(data_).slice(i * n_, n_); - } - - /// Return the i-th row. - ArrayRef operator[](size_t i) const { - assert(i < n_ && "row index out of bounds"); - return ArrayRef(data_).slice(i * n_, n_); - } - }; - - /// Construct an empty graph. - Graph() = default; - /// Construct graph from node identifiers. explicit Graph(ArrayRef nodes) { for_each(nodes, [this](const auto u) { std::ignore = adj_[u]; }); } - /// Construct graph from edge set. - explicit Graph(const llvm::DenseSet>& edges) { - for_each(edges, [this](const auto& e) { addEdge(e.first, e.second); }); - } - /// Add a directed edge to the internal representation of the graph. /// Implicitly adds nodes. void addEdge(size_t u, size_t v); @@ -71,32 +40,14 @@ class Graph { /// Return the nodes. [[nodiscard]] SmallVector getNodes() const; - /// Return the number of nodes. - [[nodiscard]] size_t getNumNodes() const { return adj_.size(); } - /// Return the degree of a node. [[nodiscard]] size_t getDegree(const size_t id) const { return adj_.at(id).size(); } - /// Return the max degree of the graph. - [[nodiscard]] size_t getMaxDegree() const; - - /// Return true if the graph has no nodes and edges. - [[nodiscard]] bool empty() const { return adj_.empty(); } - - /// Clear the graph. - void clear() { adj_.clear(); } - /// Remove the edges from the graph. Keep the nodes. void clearEdges(); - /// Return the minimum distance matrix of the graph by implementing the - /// Floyd-Warshall Algorithm - /// (https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm) where dist[i][j] - /// denotes the distance between i and j. - [[nodiscard]] Graph::DistanceMatrix getDistMatrix() const; - /// Return cycle in graph or `std::nullopt` if none exists. /// Implements an iterative depth-first search inspired by LLVM's SCC /// utilities. For a cycle [A, B, C, A], the function returns [A, B, C]. diff --git a/mlir/lib/Dialect/QCO/Transforms/Mapping/Mapping.cpp b/mlir/lib/Dialect/QCO/Transforms/Mapping/Mapping.cpp index 5a07f6378e..0da5bdc514 100644 --- a/mlir/lib/Dialect/QCO/Transforms/Mapping/Mapping.cpp +++ b/mlir/lib/Dialect/QCO/Transforms/Mapping/Mapping.cpp @@ -18,6 +18,7 @@ #include "mlir/Dialect/QCO/IR/QCODialect.h" #include "mlir/Dialect/QCO/IR/QCOInterfaces.h" #include "mlir/Dialect/QCO/IR/QCOOps.h" +#include "mlir/Dialect/QCO/QCOUtils.h" #include "mlir/Dialect/QCO/Transforms/Passes.h" #include "mlir/Dialect/QCO/Utils/Drivers.h" #include "mlir/Dialect/QCO/Utils/Graph.h" @@ -50,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -58,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -94,7 +97,7 @@ struct WireInfos { } /// Bidirectionally map a wire index to a program index. - /// Overwrites existing mappings. + /// Callers preserve a one-to-one mapping and append wire indices densely. void insertOrUpdate(const size_t index, const size_t prog) { if (index >= indexToProgram_.size()) { indexToProgram_.resize(index + 1); @@ -104,12 +107,12 @@ struct WireInfos { } indexToProgram_[index] = prog; programToIndex_[prog] = index; - programs_.insert(prog); } /// Return whether a program index has a corresponding wire. [[nodiscard]] bool containsProgram(const size_t prog) const { - return programs_.contains(prog); + return prog < programToIndex_.size() && + indexToProgram_[programToIndex_[prog]] == prog; } /// Swap two program indices. @@ -128,8 +131,6 @@ struct WireInfos { SmallVector indexToProgram_; /// Maps a program index to the i-th wire index. SmallVector programToIndex_; - /// Program indices that have corresponding wires. - DenseSet programs_; }; struct TensorAllocation { @@ -146,17 +147,29 @@ struct Computation { } // namespace -/// Verify that every non-barrier unitary can be routed by the mapping pass. +/// Check the structural input contract before traversing qubit wires. static LogicalResult validateRoutingOperations(func::FuncOp func) { + if (!llvm::hasSingleElement(func.getBody())) { + return func.emitError("mapping requires a single-block entry function"); + } const auto result = - func.walk([](UnitaryOpInterface unitary) { - if (isa(unitary) || unitary.getNumQubits() <= 2) { - return WalkResult::advance(); + func.walk([](Operation* operation) { + if (isa(operation) && + (llvm::any_of(operation->getOperandTypes(), isLinearQubitType) || + llvm::any_of(operation->getResultTypes(), isLinearQubitType))) { + operation->emitError("inline calls that carry qubits before mapping"); + return WalkResult::interrupt(); } - unitary.emitError() - << "cannot route an operation acting on " << unitary.getNumQubits() - << " qubits; decompose it to one- and two-qubit operations first"; - return WalkResult::interrupt(); + if (auto unitary = dyn_cast(operation); + unitary && !isa(operation) && + unitary.getNumQubits() > 2) { + unitary.emitError() + << "cannot route an operation acting on " + << unitary.getNumQubits() + << " qubits; decompose it to one- and two-qubit operations first"; + return WalkResult::interrupt(); + } + return WalkResult::advance(); }); return result.wasInterrupted() ? failure() : success(); } @@ -385,30 +398,11 @@ struct MappingPass : impl::MappingPassBase { float lambda; }; - /// Utility-struct for routing functions. + /// State shared by traversal and routing. struct RoutingBundle { Wires wires; WireInfos infos; Layout layout; - - struct Patch { - std::optional layout; - std::optional infos; - std::optional wires; - }; - - void applyPatch(Patch&& patch) { - Patch p = std::move(patch); - if (p.layout) { - layout = std::move(*p.layout); - } - if (p.infos) { - infos = std::move(*p.infos); - } - if (p.wires) { - wires = std::move(*p.wires); - } - } }; /// Describes a node in the A* search graph. @@ -561,11 +555,14 @@ struct MappingPass : impl::MappingPassBase { protected: void runOnOperation() override { - assert(alpha > 0 && "expected alpha > 0"); - assert(niterations > 0 && "expected niterations > 0"); - assert(ntrials > 0 && "expected ntrials > 0"); - auto moduleOp = getOperation(); + if (!std::isfinite(alpha.getValue()) || alpha <= 0 || niterations == 0 || + ntrials == 0) { + moduleOp.emitError("mapping requires finite alpha > 0, niterations > 0, " + "and ntrials > 0"); + signalPassFailure(); + return; + } if (failed(mqt::verifyQuantumAllocations(moduleOp))) { signalPassFailure(); return; @@ -954,6 +951,9 @@ struct MappingPass : impl::MappingPassBase { /// Implements the 4-Approximation algorithm described in arXiv:1602.05150v3. [[nodiscard]] SmallVector restore(const Layout& from, const Layout& to) const { + if (from == to) { + return {}; + } Layout curr(from); FGraph f(*target); SmallVector swaps; @@ -993,6 +993,9 @@ struct MappingPass : impl::MappingPassBase { [[nodiscard]] std::tuple, SmallVector> converge(const Layout& lhs, const Layout& rhs) const { + if (lhs == rhs) { + return {lhs, {}, {}}; + } std::array layouts{Layout(lhs), Layout(rhs)}; std::array graphs{FGraph(*target), FGraph(*target)}; std::array, 2> swaps{}; @@ -1379,12 +1382,10 @@ struct MappingPass : impl::MappingPassBase { } /// Extends the composite unitary's operation to cover all target qubits by - /// adding operands for indices not in the composite's index set. Returns a - /// patch with the updated wire mapping which preserves the parent's wire - /// infos and layout. - RoutingBundle::Patch place(CompositeUnitary& composite, - const RoutingBundle& parent, - IRRewriter& rewriter) { + /// adding operands for indices not in the composite's index set. Updates + /// the parent's wires while preserving its wire information and layout. + void place(CompositeUnitary& composite, RoutingBundle& parent, + IRRewriter& rewriter) { DenseSet included; // Already included indices. included.reserve(composite.indices.size()); @@ -1435,11 +1436,7 @@ struct MappingPass : impl::MappingPassBase { return it.operation() == composite.op; })); - return RoutingBundle::Patch{ - .layout = std::nullopt, - .infos = std::nullopt, - .wires = std::move(wires), - }; + parent.wires = std::move(wires); } /// Return `values` with only the qubit entries realigned according to the @@ -1467,14 +1464,13 @@ struct MappingPass : impl::MappingPassBase { } /// Processes the composite unitary by routing the nested operation and - /// inserting a SWAP appendix. Returns a pair of the patch to apply to the - /// parent bundle and the accumulated statistics, or `failure` if routing - /// fails. + /// inserting epilogue SWAPs. Updates the parent bundle and returns the + /// accumulated statistics, or `failure` if routing fails. template requires(Mode != RoutingMode::Hot || Direction == WireDirection::Forward) - FailureOr> - dispatch(const CompositeUnitary& composite, const RoutingBundle& parent, - IRRewriter* rewriter = nullptr) { + FailureOr dispatch(const CompositeUnitary& composite, + RoutingBundle& parent, + IRRewriter* rewriter = nullptr) { const auto& [op, indices] = composite; SmallVector permutation(indices.size()); @@ -1706,19 +1702,19 @@ struct MappingPass : impl::MappingPassBase { // layout and index-to-program mapping. if (isa(op)) { - return std::make_pair(RoutingBundle::Patch{}, totalStats); + return totalStats; } - RoutingBundle::Patch patch{.layout = std::nullopt, .infos = WireInfos{}}; + WireInfos updatedInfos; for (size_t i = 0; i < parent.wires.size(); ++i) { const auto oldProg = parent.infos.lookupProgram(i); const auto oldHw = parent.layout.getHardwareIndex(oldProg); const auto newProg = exit.getProgramIndex(oldHw); - patch.infos->insertOrUpdate(i, newProg); + updatedInfos.insertOrUpdate(i, newProg); } - patch.layout = std::move(exit); - - return std::make_pair(std::move(patch), totalStats); + parent.infos = std::move(updatedInfos); + parent.layout = std::move(exit); + return totalStats; } /// Iterates over a dynamically computed window of layers and uses A* search @@ -1743,8 +1739,7 @@ struct MappingPass : impl::MappingPassBase { for (auto& composite : composites) { if constexpr (Mode == RoutingMode::Hot) { - auto patch = place(composite, bundle, *rewriter); - bundle.applyPatch(std::move(patch)); + place(composite, bundle, *rewriter); } auto res = dispatch(composite, bundle, rewriter); @@ -1752,8 +1747,7 @@ struct MappingPass : impl::MappingPassBase { return failure(); } - bundle.applyPatch(std::move(res->first)); - stats.merge(res->second); + stats.merge(*res); // Once the composite is mapped, move past this op by incrementing // the respective wires. diff --git a/mlir/lib/Dialect/QCO/Utils/Graph.cpp b/mlir/lib/Dialect/QCO/Utils/Graph.cpp index 5e3de25add..2c074abd44 100644 --- a/mlir/lib/Dialect/QCO/Utils/Graph.cpp +++ b/mlir/lib/Dialect/QCO/Utils/Graph.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -33,48 +32,10 @@ ArrayRef Graph::getNeighbours(size_t id) const { return adj_.at(id); } SmallVector Graph::getNodes() const { return to_vector(adj_.keys()); } -size_t Graph::getMaxDegree() const { - size_t deg = 0; - for (const auto& [u, nbrs] : adj_) { - deg = std::ranges::max(deg, nbrs.size()); - } - return deg; -} - void Graph::clearEdges() { for_each(adj_, [](auto& kv) { kv.second.clear(); }); } -Graph::DistanceMatrix Graph::getDistMatrix() const { - const auto n = getNumNodes(); - - Graph::DistanceMatrix dist(n, std::numeric_limits::max()); - for (const auto& [u, nbrs] : adj_) { - for (const auto& v : nbrs) { - dist[u][v] = 1; - } - } - for (size_t v = 0; v < n; ++v) { - dist[v][v] = 0; - } - - for (size_t k = 0; k < n; ++k) { - for (size_t i = 0; i < n; ++i) { - for (size_t j = 0; j < n; ++j) { - if (dist[i][k] == std::numeric_limits::max() || - dist[k][j] == std::numeric_limits::max()) { - continue; // Avoid overflow with "infinite" distances. - } - - const size_t sum = dist[i][k] + dist[k][j]; - dist[i][j] = std::min(dist[i][j], sum); - } - } - } - - return dist; -} - std::optional> Graph::findCycle() const { enum struct State : uint8_t { Unseen, Seen, Finished }; @@ -108,7 +69,7 @@ std::optional> Graph::findCycle() const { auto it = adj_.find(top.id); assert(it != adj_.end() && "expected node id in adjacency map"); - const auto nbrs = it->getSecond(); + const auto& nbrs = it->getSecond(); // Once all neighbours have been visited (indicated by the index // exceeding the number of neighbours - 1), set the frame on node to diff --git a/mlir/unittests/Dialect/QCO/Transforms/Mapping/test_mapping.cpp b/mlir/unittests/Dialect/QCO/Transforms/Mapping/test_mapping.cpp index 3ad277a997..9cd618ad60 100644 --- a/mlir/unittests/Dialect/QCO/Transforms/Mapping/test_mapping.cpp +++ b/mlir/unittests/Dialect/QCO/Transforms/Mapping/test_mapping.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -323,7 +325,7 @@ class MappingPassFixture : public testing::Test { DialectRegistry registry; registry.insert(); + func::FuncDialect, cf::ControlFlowDialect>(); context = std::make_unique(); context->appendDialectRegistry(registry); context->loadAllAvailableDialects(); @@ -2500,3 +2502,113 @@ INSTANTIATE_TEST_SUITE_P(FourByFourSquareGrid, MappingPassTest, testing::Values(getSquareGridTarget(4))); INSTANTIATE_TEST_SUITE_P(TenByTenSquareGrid, MappingPassTest, testing::Values(getSquareGridTarget(10))); + +TEST_F(MappingPassFixture, RejectQuantumCallsBeforeMutation) { + auto moduleOp = parseSourceString(R"mlir( + module { + func.func private @helper(!qco.qubit) -> !qco.qubit + func.func @main() attributes {mqt.entry_point} { + %q = qco.alloc : !qco.qubit + %r = func.call @helper(%q) : (!qco.qubit) -> !qco.qubit + qco.sink %r : !qco.qubit + return + } + })mlir", + context.get()); + ASSERT_TRUE(moduleOp); + ASSERT_TRUE(succeeded(verify(*moduleOp))); + const auto target = getSquareGridTarget(2); + attachTestEnvironment(*moduleOp, target); + const auto before = printModule(*moduleOp); + std::string diagnostics; + ScopedDiagnosticHandler handler(context.get(), [&](Diagnostic& diagnostic) { + diagnostics += diagnostic.str(); + return success(); + }); + EXPECT_TRUE(failed(runPass(*moduleOp, target, MappingPassOptions{}))); + EXPECT_NE(diagnostics.find("inline calls that carry qubits before mapping"), + std::string::npos) + << diagnostics; + EXPECT_EQ(printModule(*moduleOp), before); +} + +TEST_F(MappingPassFixture, RejectEntryControlFlowBeforeMutation) { + auto moduleOp = parseSourceString(R"mlir( + module { + func.func @main() attributes {mqt.entry_point} { + %q = qco.alloc : !qco.qubit + cf.br ^exit(%q : !qco.qubit) + ^exit(%r : !qco.qubit): + qco.sink %r : !qco.qubit + return + } + })mlir", + context.get()); + ASSERT_TRUE(moduleOp); + ASSERT_TRUE(succeeded(verify(*moduleOp))); + const auto target = getSquareGridTarget(2); + attachTestEnvironment(*moduleOp, target); + const auto before = printModule(*moduleOp); + std::string diagnostics; + ScopedDiagnosticHandler handler(context.get(), [&](Diagnostic& diagnostic) { + diagnostics += diagnostic.str(); + return success(); + }); + EXPECT_TRUE(failed(runPass(*moduleOp, target, MappingPassOptions{}))); + EXPECT_NE(diagnostics.find("mapping requires a single-block entry function"), + std::string::npos) + << diagnostics; + EXPECT_EQ(printModule(*moduleOp), before); +} + +TEST_F(MappingPassFixture, RejectInvalidOptionsBeforeMutation) { + const auto target = getSquareGridTarget(2); + for (const auto& options : { + MappingPassOptions{.ntrials = 0}, + MappingPassOptions{.niterations = 0}, + MappingPassOptions{.alpha = 0}, + MappingPassOptions{.alpha = -1}, + MappingPassOptions{.alpha = std::numeric_limits::infinity()}, + MappingPassOptions{.alpha = std::numeric_limits::quiet_NaN()}, + }) { + QCOProgramBuilder builder(context.get()); + builder.initialize(); + builder.sink(builder.allocQubit()); + auto moduleOp = builder.finalize(); + ASSERT_TRUE(succeeded(verify(*moduleOp))); + attachTestEnvironment(*moduleOp, target); + const auto before = printModule(*moduleOp); + std::string diagnostics; + ScopedDiagnosticHandler handler(context.get(), [&](Diagnostic& diagnostic) { + diagnostics += diagnostic.str(); + return success(); + }); + EXPECT_TRUE(failed(runPass(*moduleOp, target, options))); + EXPECT_NE(diagnostics.find("mapping requires finite alpha > 0"), + std::string::npos) + << diagnostics; + EXPECT_EQ(printModule(*moduleOp), before); + } +} + +TEST_F(MappingPassFixture, PreserveClassicalCalls) { + auto moduleOp = parseSourceString(R"mlir( + module { + func.func private @classical() + func.func @main() attributes {mqt.entry_point} { + %q = qco.alloc : !qco.qubit + func.call @classical() : () -> () + qco.sink %q : !qco.qubit + return + } + })mlir", + context.get()); + ASSERT_TRUE(moduleOp); + ASSERT_TRUE(succeeded(verify(*moduleOp))); + ASSERT_TRUE(succeeded(runPass(*moduleOp, getSquareGridTarget(2), + MappingPassOptions{.ntrials = 1}))); + EXPECT_TRUE(succeeded(verify(*moduleOp))); + size_t calls = 0; + moduleOp->walk([&](func::CallOp) { ++calls; }); + EXPECT_EQ(calls, 1); +} diff --git a/noxfile.py b/noxfile.py index 010e3d68e5..c435f4b4d3 100755 --- a/noxfile.py +++ b/noxfile.py @@ -111,7 +111,7 @@ def cpp_lint(session: nox.Session) -> None: "--style=", "--tidy-checks=", f"--version={llvm_bin}", - "--ignore=build|!build/mlir/**|**/include|include|vendor/**", + "--ignore=build|!build/mlir/**|**/include|include|vendor/**|.agents/benchmarks/**", "--thread-comments=false", "--step-summary=false", "--database=build/cpp-lint", diff --git a/pyproject.toml b/pyproject.toml index e53f23369a..6702d22d56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -295,6 +295,7 @@ test-sources = [] line-length = 120 namespace-packages = [ "mqt" ] src = [ "python" ] +extend-exclude = [ ".agents/benchmarks/**" ] preview = true fix = true unsafe-fixes = true @@ -391,6 +392,7 @@ olt = "olt" [tool.ty.src] exclude = [ + ".agents/benchmarks/**", "docs/**", "mlir/**", ]