Skip to content

sync#2

Open
nanocoh wants to merge 1652 commits into
keplertech:masterfrom
The-OpenROAD-Project:master
Open

sync#2
nanocoh wants to merge 1652 commits into
keplertech:masterfrom
The-OpenROAD-Project:master

Conversation

@nanocoh

@nanocoh nanocoh commented May 23, 2026

Copy link
Copy Markdown

Summary

[Describe your changes here]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Impact

[How does this change the tool's behavior?]

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have included tests to prevent regressions.
  • I have signed my commits (DCO).

Related Issues

[Link issues here]

maliberty and others added 29 commits June 30, 2026 05:04
Fix incorrect @param names in doc comments
cts: isolate tests from global and detailed placement (#10749)
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
Signed-off-by: Martin Povišer <povik@cutebit.org>
Signed-off-by: Martin Povišer <povik@cutebit.org>
gpl builds one NesterovBase per placement region (top-level core plus one per
power-domain / odb group) but a single shared NesterovBaseCommon with one GPU
DeviceState. The four FFT field Views (d_bin_density / d_bin_phi / d_bin_elec_*)
and the bin-grid metadata lived in that shared DeviceState and were overwritten
per region by DeviceState::initBinViews; the Nesterov loop also solves all
regions and only then gathers all regions, so with more than one region a
region's density solve read another region's (or a wrong-sized) bin buffer.
That is an out-of-bounds device access when the regions' bin counts differ, or
a silently wrong placement when they match (measured +119% HPWL on the dual
voltage-domain region01 design). Single-region placement was unaffected, so the
existing tests passed. Reported by a Codex review.

Move the per-region state into a new RegionDensityField (PIMPL, one per
NesterovBase, declared before fft_/density_grad_backend_ so it outlives the
backends that borrow it); it holds only the four field Views + bin metadata.
The shared DeviceState keeps the netlist/HPWL pool and the per-inst density
params + gather output, which are indexed by the global gCellStor instance id
and identical across regions; their allocation moves out of the old
initBinViews into the DeviceState constructor. Both GPU density paths are
repointed at the region field: the device-resident pipeline
(NesterovDeviceContext) and the host-staged FFT path (GpuFftBackend /
GpuDensityGradientBackend), the latter used in timing-driven / routability mode
where the device context is disabled -- which is why the field is owned by
NesterovBase rather than the device context.

Harden two previously-silent seams: the bin-count check in densitySolveIteration
now aborts in release builds (was a debug-only assert), and NesterovBase errors
out if a GPU region's bin grid is empty instead of silently using CPU density.

Add two GPU-only regression tests (CMake-only, like the other GPU tests):
region01_gpu (two same-size domains; the silent-interleaving case) and
region01_gpu_asym (different-size domains; the out-of-bounds case), each
checking the GPU total HPWL within 3% of the CPU reference and pinned to
ENABLE_GPU=1 so they cannot pass on the CPU backend.

Verified: CPU goldens unchanged (including multi-region CPU region01);
single-region GPU within 0.001% of CPU; multi-region GPU now within 0.7% /
0.28% of CPU (was +119%). Also trimmed redundant comments across the GPU path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Minjae Kim <develop.minjae@gmail.com>
ClusteringEngine::reportDesignData() already reports the total macro
count ("Number of macros"), which counts every block instance including
fixed ones. It did not surface how many macros MPL will actually place
(the unfixed macros).

Pass the unfixed-macro count, already collected in init(), into
reportDesignData() and print it as a new "Macros to be placed" line next
to the existing total so the two numbers are easy to compare. For designs
with fixed macros the two values differ (e.g. fixed_macros1: 2 total,
1 to place).

Updated the affected MPL test goldens.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
The new size_t parameter on reportDesignData() introduced the first
direct use of size_t in clusterEngine.{cpp,h}, which clang-tidy's
misc-include-cleaner flagged. Include <cstddef> directly in both files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
…leanup

Clean up and test NPN classification
pdn: throw error on missing grid when adding components instead of silent pass
… option

Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
Signed-off-by: Peter Gadfort <gadfort@zeroasic.com>
Signed-off-by: LucasYuki <lucasyuki@yahoo.com.br>
…reading

Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
grt: bound soft-NDR overflow-loop restarts (#8466)
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
pdn: add check for instance halo to ensure it does not overlap rows
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
syn: link syn_lib into npn_test to resolve Synthesis::dontUse
gudeh and others added 30 commits July 9, 2026 14:54
…xed instances),

Replace the per-side deficit-and-reallocate logic with two pointers walking out from the anchor.
Keep loking past fixed instances and budget it cannot spend is used on the other side.
Include the consideration of row-less spaces.

Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
The odb cpp tests all linked a monolithic TEST_LIBS set, which pulled in
the catch-all odb interface library (all parsers, gds, cdl, 3dblox) plus
gmock into every executable, producing bloated test binaries.

Link each executable against only what it needs, using
src/odb/test/cpp/BUILD as the reference for the minimal dependency set.
odb_test_helper now links db and tst PUBLIC (matching helper/BUILD) so
its public header is usable by consumers without the full odb library.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
The tst library compiled both fixture.cpp and IntegratedFixture.cpp and
publicly linked the full optimization tool chain (ant, dpl, est, grt,
rsz, stt). Every tst consumer paid for that, even tests that only read a
design with the lightweight fixture.

Mirror the Bazel split (//src/tst vs //src/tst:integrated_fixture): tst
now builds only fixture.cpp and links dbSta, while the new
tst_integrated_fixture builds IntegratedFixture.cpp and pulls in the
tool chain. Clients that use IntegratedFixture (dbSta, rsz, est and odb
tests) now depend on tst_integrated_fixture; lightweight fixture users
stay on tst. Dependency assignments follow src/tst/BUILD.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
dbSta_lib and tst both linked the catch-all odb INTERFACE target, which
aggregates every odb sublibrary (cdl, 3dblox, defin, defout, lefin,
lefout, gdsin, gdsout). Because these are static libs, that dependency
propagated to every consumer at link time, so tests like TestAccessPoint
pulled in gdsin/gdsout and all the parsers despite using none of them.

Point dbSta_lib and tst at the granular db target (matching Bazel), plus
the specific parsers fixture.cpp actually uses (lefin). 3dblox internally
uses defin/defout/lefin/lefout but relied on consumers to supply them
transitively; declare those deps on the 3dblox library itself (matching
src/odb/src/3dblox/BUILD) so it is self-contained.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.5 to 6.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@27d5ce7...55cc834)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4.8.0 to 5.5.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@c1e3236...0f481fc)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 5.5.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/first-interaction](https://github.com/actions/first-interaction) from 1.3.0 to 3.1.0.
- [Release notes](https://github.com/actions/first-interaction/releases)
- [Commits](actions/first-interaction@34f15e8...1c46889)

---
updated-dependencies:
- dependency-name: actions/first-interaction
  dependency-version: 3.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.11 to 8.1.1.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@22a9089...5f6978f)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: 8.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…_actions/actions/cache-6.1.0

build(deps): bump actions/cache from 5.0.5 to 6.1.0
…_actions/peter-evans/create-pull-request-8.1.1

build(deps): bump peter-evans/create-pull-request from 7.0.11 to 8.1.1
…_actions/actions/setup-java-5.5.0

build(deps): bump actions/setup-java from 4.8.0 to 5.5.0
…_actions/actions/first-interaction-3.1.0

build(deps): bump actions/first-interaction from 1.3.0 to 3.1.0
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…-action-inputs

ci: fix first-interaction input names for v3 (snake_case)
gtest_discover_tests() defaults to POST_BUILD discovery, which executes
each freshly-built test binary during the build to enumerate its cases.
On a loaded CI host that launch can exceed the discovery timeout, so
CMake aborts the whole build (seen intermittently on single distros,
e.g. rockylinux9: liveness_test, TestSnapper, TestInsertBuffer,
OdbGTests all "terminated due to timeout").

Set CMAKE_GTEST_DISCOVER_TESTS_DISCOVERY_MODE=PRE_TEST so discovery runs
at ctest time instead, where the host is not saturated by parallel
compiles. This removes test-binary execution from the build entirely,
so the build stage can no longer fail on discovery.

This also replaces the prior TEST_DISCOVERY_TIMEOUT directory property,
which had no effect: it is not a real CMake property, and
gtest_discover_tests only honors an explicit DISCOVERY_TIMEOUT argument.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…-discovery-flake

build: defer gtest discovery to ctest time to fix flaky CI builds
single_version_override applies only in the root module, so downstream
consumers of OpenROAD were left on the transitive freetype@2.13.3 whose
BUILD overlay calls the native cc_library rule Bazel 9 removed. Pin it
as a direct bazel_dep so the 2.13.3.bcr.2 version (same source, overlay
loads cc_library from @rules_cc) propagates via MVS.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…r-design-reroute

RSZ: repair design reroute for slew fix
The tst Fixture unconditionally created a dbSta instance, so every test
that used it linked OpenSTA + dbSta even when it only manipulated an odb
database (e.g. the odb helper-based tests). OpenSTA/dbSta debug symbols
dominate those binaries (~160 MB each).

Split Fixture into a base tst::DbFixture (tst/db_fixture.h, odb-only: db
manipulation, LEF tech loading, file lookup) and a derived tst::Fixture
(tst/fixture.h) that adds the dbSta/OpenSTA instance, readLiberty, and
the LEF library loaders that notify STA. The base lives in a new tst_base
library (//src/tst:db_fixture in Bazel) that does not link STA.

odb DB-only tests and SimpleDbFixture now derive from DbFixture and link
tst_base; STA consumers (PDK fixtures, IntegratedFixture, rsz/dbSta/est
tests) are unchanged. Mirrored in Bazel.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…d-fields

rcx: rm ununsed fields in dbCreateNetUtil
Debug info dominates the size of these binaries (template-heavy C++;
TestAccessPoint was ~97% DWARF). Enable -gz=zlib for GNU/Clang in the
Debug and RelWithDebInfo configs, at both compile and link, to compress
the .debug_* sections.

This is transparent to gdb/lldb/readelf/addr2line and a no-op for builds
without -g (e.g. Release). TestAccessPoint drops 330 MB -> 89 MB (-73%).

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
The default bazel build is -c opt with no -g, so it carries no debug
info. The asan and profile configs add -g (and keep symbols via
--strip=never), so their binaries carry DWARF that benefits from
compression, mirroring the CMake -gz change.

Add -gz=zlib (compile + link) to the asan and profile configs. It is
transparent to gdb/perf/addr2line.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
The tst_base fixture library links GTest::gtest, but that imported
target only exists when find_package(GTest) runs, which is guarded by
ENABLE_TESTS. add_subdirectory(tst) was unconditional, so a -no-tests
build failed at generate time with 'Target tst_base links to
GTest::gtest but the target was not found'.

Guard add_subdirectory(tst) with ENABLE_TESTS. This is safe because
every consumer of tst/tst_base/tst_integrated_fixture lives in a
test/cpp directory that is itself gated by ENABLE_TESTS.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…minimal-deps

Trim odb test binary bloat: minimal deps, fixture split, debug compression
GlobalRouter::removeNet only erased the net from dirty_nets_ in the
FastRoute (non-CUGR) branch. When use_cugr_ is true, a net destroyed
during incremental routing stayed in dirty_nets_, so updateDirtyRoutes
later passed the dangling dbNet to CUGR::updateNet, which dereferenced
it via Design::updateNet (db_net->getSigType()).

In release builds (NDEBUG) this use-after-free is silent, so
grt.incremental_deleted_net.tcl passed. With assertions enabled
(coverage / RELEASEWITHASSERTS builds) the stale sig type tripped
dbSigType::isSupply()'s assert(false) and aborted.

Move the dirty_nets_.erase to run for both routers.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
…dirty-net-destroy

grt: erase destroyed net from dirty set in CUGR path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.