From 75e9ae6147c71d918afcb27f5a6b21b2ea3b9103 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 04:40:54 +0000 Subject: [PATCH 1/6] :arrow_up: Bump the submodules group with 2 updates Bumps the submodules group with 2 updates: [libs/Catch2](https://github.com/catchorg/Catch2) and [libs/pybind11](https://github.com/pybind/pybind11). Updates `libs/Catch2` from `fa43b77` to `0b2af56` - [Release notes](https://github.com/catchorg/Catch2/releases) - [Commits](https://github.com/catchorg/Catch2/compare/fa43b77429ba76c462b1898d6cd2f2d7a9416b14...0b2af562710d1bac7fd32ca3f05bf1d713bb97e4) Updates `libs/pybind11` from `af67e87` to `f7e14e9` - [Release notes](https://github.com/pybind/pybind11/releases) - [Commits](https://github.com/pybind/pybind11/compare/af67e87393b0f867ccffc2702885eea12de063fc...f7e14e985be167ca158fd3ee2fe5d8a4f175fa87) --- updated-dependencies: - dependency-name: libs/Catch2 dependency-type: direct:production dependency-group: submodules - dependency-name: libs/pybind11 dependency-type: direct:production dependency-group: submodules ... Signed-off-by: dependabot[bot] --- libs/Catch2 | 2 +- libs/pybind11 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/Catch2 b/libs/Catch2 index fa43b7742..0b2af5627 160000 --- a/libs/Catch2 +++ b/libs/Catch2 @@ -1 +1 @@ -Subproject commit fa43b77429ba76c462b1898d6cd2f2d7a9416b14 +Subproject commit 0b2af562710d1bac7fd32ca3f05bf1d713bb97e4 diff --git a/libs/pybind11 b/libs/pybind11 index af67e8739..f7e14e985 160000 --- a/libs/pybind11 +++ b/libs/pybind11 @@ -1 +1 @@ -Subproject commit af67e87393b0f867ccffc2702885eea12de063fc +Subproject commit f7e14e985be167ca158fd3ee2fe5d8a4f175fa87 From f6f708fff4fdb437540f4bf162903e9f6c06867d Mon Sep 17 00:00:00 2001 From: Marcel Walter Date: Fri, 18 Oct 2024 15:05:33 +0200 Subject: [PATCH 2/6] :pushpin: Pinned all Mugen requirements to specific versions --- libs/mugen/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/mugen/requirements.txt b/libs/mugen/requirements.txt index e692a27c0..7f452d0fd 100644 --- a/libs/mugen/requirements.txt +++ b/libs/mugen/requirements.txt @@ -1,3 +1,3 @@ python-sat==0.1.6.dev6 -wrapt_timeout_decorator -graphviz +wrapt_timeout_decorator==1.5.1 +graphviz==0.20.3 From a789f0d7ae942c63c737a96793522a7144dbcd01 Mon Sep 17 00:00:00 2001 From: Marcel Walter Date: Fri, 18 Oct 2024 15:06:29 +0200 Subject: [PATCH 3/6] :rotating_light: Cleaned up includes --- .../physical_design/one_pass_synthesis.hpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp index 7d527a736..868ce15a7 100644 --- a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp +++ b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp @@ -9,13 +9,14 @@ #include "fiction/algorithms/iter/aspect_ratio_iterator.hpp" #include "fiction/layouts/clocking_scheme.hpp" -#include "fiction/layouts/coordinates.hpp" +#include "fiction/traits.hpp" #include "fiction/utils/name_utils.hpp" #include "utils/mugen_info.hpp" #include #include #include +#include #include #if (PROGRESS_BARS) @@ -23,16 +24,19 @@ #endif #include +#include #include +#include +#include #include -#include #include #include #include #include -#include #include +#include #include +#include #include // pybind11 has quite some warnings in its code; let's silence them a little @@ -45,7 +49,10 @@ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #pragma GCC diagnostic ignored "-Wrange-loop-analysis" #pragma warning(push, 0) // MSVC +#include #include +#include +#include #pragma GCC diagnostic pop // GCC #pragma warning(pop) // MSVC From e18063b41eaa665b6222234e4c2935a3ee8255ef Mon Sep 17 00:00:00 2001 From: Marcel Walter Date: Fri, 18 Oct 2024 15:07:20 +0200 Subject: [PATCH 4/6] :memo: Fixed a documentation error --- .../fiction/algorithms/physical_design/one_pass_synthesis.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp index 868ce15a7..5f91ea9fa 100644 --- a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp +++ b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp @@ -165,7 +165,7 @@ class mugen_handler * Standard constructor. * * @param spec The Boolean functions to synthesize. - * @param lyt Reference to an empty layout that serves as a floor plan for S&P&R by Mugen. + * @param sketch Reference to an empty layout that serves as a floor plan for S&P&R by Mugen. * @param p The configurations to respect in the SAT instance generation process. */ mugen_handler(const std::vector& spec, Lyt& sketch, one_pass_synthesis_params p) : From ccc80d7a90c8b365a9a44f2c8cd7b6c525fdbede Mon Sep 17 00:00:00 2001 From: Marcel Walter Date: Fri, 18 Oct 2024 15:08:31 +0200 Subject: [PATCH 5/6] :alien: Adjusted iterator handling due to a breaking change in pybind11: https://github.com/pybind/pybind11/issues/5399 (introduced off-by-one behavior) --- .../fiction/algorithms/physical_design/one_pass_synthesis.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp index 5f91ea9fa..c57c6f5e2 100644 --- a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp +++ b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp @@ -370,8 +370,7 @@ class mugen_handler // set up the iterator to skip the PIs auto pi_it_end = nodes.begin(); // use std::advance because there is no 'operator+' overload - std::advance(pi_it_end, - static_cast::difference_type>(num_pis + 1)); + std::advance(pi_it_end, static_cast::difference_type>(num_pis)); return pi_it_end; } From 37c08715534268b48fdc81f18fcb802cff09d4a1 Mon Sep 17 00:00:00 2001 From: Marcel Walter Date: Fri, 18 Oct 2024 15:09:12 +0200 Subject: [PATCH 6/6] :art: Streamlined exception handling to catch such bugs easier in the future --- .../physical_design/one_pass_synthesis.hpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp index c57c6f5e2..9a8ab7109 100644 --- a/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp +++ b/include/fiction/algorithms/physical_design/one_pass_synthesis.hpp @@ -785,10 +785,23 @@ class one_pass_synthesis_impl update_timeout(handler, pst.time_total); } } - // timeout reached + catch (const pybind11::error_already_set& e) + { + // timeout reached + if (e.matches(PyExc_TimeoutError)) + { + return std::nullopt; + } + + // unexpected error + std::cout << "[e] something unexpected happened in Python; this needs investigation" << std::endl; + throw; + } + // unexpected exception catch (...) { - return std::nullopt; + std::cout << "[e] something unexpected happened; this needs investigation" << std::endl; + throw; } }