Skip to content

gpl: register large placement tests in bazel and ctest#10962

Open
maliberty wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gpl-large-tests-registration
Open

gpl: register large placement tests in bazel and ctest#10962
maliberty wants to merge 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gpl-large-tests-registration

Conversation

@maliberty

Copy link
Copy Markdown
Member

The ./regression-large suite (macro01-03, medium01-06, large01-02) was only runnable via the standalone tclsh script, and its goldens had gone stale — the suite fails on master. This registers the tests in both build systems and refreshes the goldens:

  • Bazel: manual-tagged regression_test targets (size = "large") so wildcard builds and CI skip them; run explicitly, e.g. bazelisk test //src/gpl/test:large01-tcl_test
  • CMake: guarded by -DGPL_LARGE_TESTS=ON (off by default) so bare ctest and coverage runs are unaffected. When enabled the tests join the gpl label and get the same ENABLE_GPU=0 pinning as the other golden-compare tests.
  • Goldens: all 11 .ok/.defok pairs regenerated (the bulk of the diff). Every test runs to completion; final HPWL moves by at most 0.04% versus the old goldens. Runtimes are 9-150 s per test.

medium07 and large03 have .tcl files but no goldens and are not in regression_tests_large.tcl, so they remain unregistered.

The ./regression-large suite (macro01-03, medium01-06, large01-02) was
only runnable via the standalone tclsh script. Register the tests in
both build systems:

- Bazel: manual-tagged regression_test targets (size = "large") so
  wildcard builds and CI skip them; run explicitly, e.g.
  bazelisk test //src/gpl/test:large01-tcl_test
- CMake: guarded by -DGPL_LARGE_TESTS=ON (off by default) so bare
  ctest and coverage runs are unaffected.

Refresh the stale .ok/.defok goldens: all 11 tests run to completion
and the final HPWL moves by at most 0.04% versus the old goldens.

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates a suite of long-running placement tests (LARGE_TESTS) into both the Bazel and CMake build configurations, tagging them as manual or optional to prevent them from running during standard CI cycles. It also updates the golden output files (.ok) to reflect minor numerical changes in global placement iterations and final HPWL values. The feedback recommends replacing a list comprehension in the Bazel BUILD file with a standard for loop, as using list comprehensions solely for side-effects is discouraged in Starlark.

Comment thread src/gpl/test/BUILD Outdated
@maliberty
maliberty marked this pull request as ready for review July 21, 2026 14:01
@maliberty
maliberty requested a review from a team as a code owner July 21, 2026 14:01
@maliberty
maliberty requested a review from gudeh July 21, 2026 14:01
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Matt Liberty <matt.liberty@gmail.com>
@maliberty

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7585f03f21

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/gpl/test/BUILD
data = [":test_resources"],
) for test_name in ALL_TESTS]

for test_name in LARGE_TESTS:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid top-level for loops in BUILD files

In this context, src/gpl/test/BUILD can no longer be loaded by Bazel because BUILD files disallow top-level for statements; Bazel’s current Starlark docs say to use functions instead and note that list comprehensions are allowed in BUILD files (https://bazel.build/rules/language). This means any bazel test //src/gpl/test:..., including existing small GPL tests, fails during package loading before the new manual targets can run. Please use the same list-comprehension pattern as the existing ALL_TESTS registration or move the loop into a .bzl macro.

Useful? React with 👍 / 👎.

@gudeh

gudeh commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

This is good, I wasn't able to use threads with the regression-large script, now we can.

@gudeh

gudeh commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

I see ERROR: /home/runner/work/OpenROAD/OpenROAD/src/gpl/test/BUILD:120:1: for statements are not allowed in BUILD files. You may inline the loop, move it to a function definition (in a .bzl file), or as a last resort use a list comprehension.

I can try to fix if you want me to @maliberty

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.

2 participants