From 7d65f2804325e78d23a18167963e2b2d5dd8965f Mon Sep 17 00:00:00 2001 From: Jiahui Xu Date: Thu, 27 Nov 2025 12:38:39 +0100 Subject: [PATCH 1/3] [CI] Add 3 benchmarks that uses FTD to CI pipeline --- tools/integration/TEST_SUITE.cpp | 35 ++++++++++++++++++++++++++++++++ tools/integration/util.cpp | 1 + tools/integration/util.h | 1 + 3 files changed, 37 insertions(+) diff --git a/tools/integration/TEST_SUITE.cpp b/tools/integration/TEST_SUITE.cpp index cbafa8021a..b06a85b5ac 100644 --- a/tools/integration/TEST_SUITE.cpp +++ b/tools/integration/TEST_SUITE.cpp @@ -50,6 +50,7 @@ class SharingUnitTestFixture : public BaseFixture {}; class SpecFixture : public BaseFixture {}; class RigidificationFixture : public BaseFixture {}; +class FtdWithSimpleBuffersFixture : public BaseFixture {}; TEST_P(BasicFixture, basic) { IntegrationTestData config{ @@ -85,6 +86,24 @@ TEST_P(CBCSolverFixture, basic) { logPerformance(config.simTime); } +TEST_P(FtdWithSimpleBuffersFixture, basic) { + IntegrationTestData config{ + // clang-format off + .name = GetParam(), + .benchmarkPath = fs::path(DYNAMATIC_ROOT) / "integration-test", + .testVerilog = false, + .useSharing = false, + .milpSolver = "cbc", + .bufferAlgorithm = "on-merges", + .useFtd = true, + .simTime = -1 + // clang-format on + }; + EXPECT_EQ(runIntegrationTest(config), 0); + RecordProperty("cycles", std::to_string(config.simTime)); + logPerformance(config.simTime); +} + #if 0 TEST_P(FPL22Fixture, basic) { IntegrationTestData config{ @@ -305,6 +324,22 @@ INSTANTIATE_TEST_SUITE_P( ), [](const auto &info) { return info.param; }); +// Smoke test: Using the fast token delivery algorithm to compile the circuit. +INSTANTIATE_TEST_SUITE_P( + Tiny, FtdWithSimpleBuffersFixture, + testing::Values( + // "matvec" // matvec does not work currently + "fir", + "if_loop_add", + "if_loop_mul", + "iir", + "matvec", + "kernel_2mm", + "kernel_3mm", + "kmp" + ), + [](const auto &info) { return info.param; }); + #if 0 // Smoke test: Using the FPL22 placement algorithm to optimize some simple benchmarks INSTANTIATE_TEST_SUITE_P( diff --git a/tools/integration/util.cpp b/tools/integration/util.cpp index 54325e7821..bbe474dce0 100644 --- a/tools/integration/util.cpp +++ b/tools/integration/util.cpp @@ -50,6 +50,7 @@ int runIntegrationTest(IntegrationTestData &config) { << " --buffer-algorithm " << config.bufferAlgorithm << (config.useSharing ? " --sharing" : "") << (config.useRigidification ? " --rigidification" : "") + << (config.useFtd ? " --fast-token-delivery" : "") << " --milp-solver " << config.milpSolver << std::endl; // clang-format on diff --git a/tools/integration/util.h b/tools/integration/util.h index 0d269c4ab3..9ef2910d03 100644 --- a/tools/integration/util.h +++ b/tools/integration/util.h @@ -35,6 +35,7 @@ struct IntegrationTestData { bool useRigidification = false; std::string milpSolver = "gurobi"; std::string bufferAlgorithm = "fpga20"; + bool useFtd = false; // Results int simTime; From 566733aae78936f39755adfcb48a08535ef538af Mon Sep 17 00:00:00 2001 From: Jiahui Xu Date: Mon, 2 Feb 2026 11:45:37 +0100 Subject: [PATCH 2/3] Disable LSQ for FTD --- tools/integration/TEST_SUITE.cpp | 5 ++++- tools/integration/util.cpp | 1 + tools/integration/util.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/integration/TEST_SUITE.cpp b/tools/integration/TEST_SUITE.cpp index b06a85b5ac..5d13c50520 100644 --- a/tools/integration/TEST_SUITE.cpp +++ b/tools/integration/TEST_SUITE.cpp @@ -93,6 +93,7 @@ TEST_P(FtdWithSimpleBuffersFixture, basic) { .benchmarkPath = fs::path(DYNAMATIC_ROOT) / "integration-test", .testVerilog = false, .useSharing = false, + .disableLsq = true, .milpSolver = "cbc", .bufferAlgorithm = "on-merges", .useFtd = true, @@ -336,7 +337,9 @@ INSTANTIATE_TEST_SUITE_P( "matvec", "kernel_2mm", "kernel_3mm", - "kmp" + "kmp", + "gcd", + "bicg" ), [](const auto &info) { return info.param; }); diff --git a/tools/integration/util.cpp b/tools/integration/util.cpp index bbe474dce0..0b991956bb 100644 --- a/tools/integration/util.cpp +++ b/tools/integration/util.cpp @@ -51,6 +51,7 @@ int runIntegrationTest(IntegrationTestData &config) { << (config.useSharing ? " --sharing" : "") << (config.useRigidification ? " --rigidification" : "") << (config.useFtd ? " --fast-token-delivery" : "") + << (config.disableLsq ? " --disable-lsq" : "") << " --milp-solver " << config.milpSolver << std::endl; // clang-format on diff --git a/tools/integration/util.h b/tools/integration/util.h index 9ef2910d03..3940e79b58 100644 --- a/tools/integration/util.h +++ b/tools/integration/util.h @@ -33,6 +33,7 @@ struct IntegrationTestData { bool useSharing = false; // Use model checking to remove redundant logic. bool useRigidification = false; + bool disableLsq = false; std::string milpSolver = "gurobi"; std::string bufferAlgorithm = "fpga20"; bool useFtd = false; From e59f07c85eb7b8319b053078083faad8981b1eab Mon Sep 17 00:00:00 2001 From: Jiahui Xu Date: Mon, 2 Feb 2026 12:46:35 +0100 Subject: [PATCH 3/3] fix mkdir --- tools/dynamatic/scripts/compile.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/dynamatic/scripts/compile.sh b/tools/dynamatic/scripts/compile.sh index 5ae7be4520..07d3e07e0f 100755 --- a/tools/dynamatic/scripts/compile.sh +++ b/tools/dynamatic/scripts/compile.sh @@ -322,6 +322,8 @@ else echo_info "Set to use \"$MILP_SOLVER\" to solve buffer placement MILP!" + mkdir -p "$COMP_DIR/buffer-placement" + # Smart buffer placement echo_info "Running smart buffer placement with CP = $TARGET_CP and algorithm = '$BUFFER_ALGORITHM'" cd "$COMP_DIR"