Skip to content

Commit dbca9dd

Browse files
committed
Merge branch 'master' into cts_improve_level_creating_threshold
2 parents 11ea2ca + 5c5380c commit dbca9dd

413 files changed

Lines changed: 1336680 additions & 1259792 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bazelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ build:asan --copt=-O1
108108
build:asan --copt=-g
109109
build:asan --copt=-fno-omit-frame-pointer
110110
build:asan --linkopt=-fsanitize=address
111+
# TCMalloc is incompatible with ASan: __asan_init's interceptor setup calls
112+
# dlsym -> malloc before TCMalloc is initialized, segfaulting at startup.
113+
# Override the per-target malloc attribute to use the system allocator, which
114+
# ASan intercepts cleanly.
115+
build:asan --custom_malloc=@bazel_tools//tools/cpp:malloc
111116

112117
# Flags with enough debug symbols to get useful outputs with Linux `perf`
113118
build:profile --strip=never

.github/workflows/github-actions-check-bazel-lock.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,16 @@ jobs:
1212
- name: Check out repository code
1313
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1414

15-
- name: Verify lock file is up to date
16-
run: bazelisk mod deps --lockfile_mode=error
15+
- name: Update lock file to check for differences
16+
run: |
17+
cp MODULE.bazel MODULE.bazel.before
18+
bazelisk mod deps --lockfile_mode=update
19+
20+
- name: Differences to be adressed
21+
run: |
22+
if ! diff MODULE.bazel.before MODULE.bazel ; then
23+
echo "Run"
24+
echo "bazelisk mod deps --lockfile_mode=update"
25+
echo "and update pull request"
26+
exit 1
27+
fi

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
url = ../../The-OpenROAD-Project/abc.git
77
[submodule "third-party/slang-elab"]
88
path = third-party/slang-elab
9-
url = https://github.com/povik/yosys-slang
9+
url = ../../povik/yosys-slang.git

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# source control.
77

88
Andrew Kennings
9+
Antmicro
910
Federal University of Rio Grande do Sul (UFRGS)
1011
Google LLC
1112
Iowa State University

CMakeLists.txt

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ cmake_policy(SET CMP0074 NEW)
2121
# critical for builds in non-standard environments.
2222
cmake_policy(SET CMP0144 NEW)
2323

24-
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.27")
25-
# Disallows <PACKAGENAME>_ROOT in find_package.
26-
# TODO: resolve absl/or-tools issue and switch to NEW
27-
cmake_policy(SET CMP0144 OLD)
28-
endif()
29-
3024
# Allow AUTOUIC on generated source
3125
cmake_policy(SET CMP0071 NEW)
3226

@@ -48,6 +42,13 @@ option(USE_SYSTEM_ABC "Use system shared ABC library" OFF)
4842
# Allow disabling tests
4943
option(ENABLE_TESTS "Enable OpenROAD tests" ON)
5044

45+
# Opt-in GPU acceleration via Kokkos. The actual compute backend (CUDA, HIP,
46+
# SYCL, or host-only OpenMP/Threads) is determined by the installed Kokkos
47+
# package; OpenROAD inspects Kokkos_ENABLE_* and turns on the matching CMake
48+
# language and dependencies automatically. See the per-module CMakeLists for
49+
# how individual subsystems wire their GPU sources.
50+
option(ENABLE_GPU "Enable GPU acceleration via Kokkos" OFF)
51+
5152
# Allow enabling address sanitizer
5253
option(ASAN "Enable Address Sanitizer" OFF)
5354

@@ -94,6 +95,13 @@ if(NOT CMAKE_BUILD_TYPE)
9495
set(CMAKE_BUILD_TYPE RELEASE)
9596
endif()
9697

98+
# GPU backend wiring (opt-in). All Kokkos / CUDA / HIP / SYCL detection,
99+
# compiler probing, and language enablement live in cmake/KokkosBackend.cmake
100+
# and are loaded only when the user opts in via ENABLE_GPU=ON.
101+
if(ENABLE_GPU)
102+
include(KokkosBackend)
103+
endif()
104+
97105
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
98106
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.3.0")
99107
message(FATAL_ERROR "Insufficient gcc version. Found ${CMAKE_CXX_COMPILER_VERSION}, but require >= 8.3.0.")

MODULE.bazel

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ single_version_override(
2323

2424
bazel_dep(name = "abseil-cpp", version = "20260107.1")
2525
bazel_dep(name = "bazel_skylib", version = "1.7.1")
26-
bazel_dep(name = "coin-or-lemon", version = "1.3.1")
26+
bazel_dep(name = "coin-or-lemon", version = "1.3.1.bcr.1")
2727
bazel_dep(name = "platforms", version = "1.0.0")
2828
bazel_dep(name = "rules_bison", version = "0.3.1")
2929
bazel_dep(name = "rules_cc", version = "0.2.18")
@@ -158,18 +158,7 @@ archive_override(
158158
)
159159

160160
bazel_dep(name = "yosys", version = "0.62.bcr.2", dev_dependency = True)
161-
162-
# yosys-slang is not on BCR. Pin to a commit on povik/yosys-slang master
163-
# that has the upstream Bazel build (povik/yosys-slang#310) and the
164-
# slang.so visibility fix (povik/yosys-slang#311). Submodules pull in
165-
# vendored slang and fmt sources.
166-
bazel_dep(name = "yosys-slang", dev_dependency = True)
167-
git_override(
168-
module_name = "yosys-slang",
169-
commit = "7753ea70431d85929292b90c33b32f6dbdb3b048",
170-
init_submodules = True,
171-
remote = "https://github.com/povik/yosys-slang.git",
172-
)
161+
bazel_dep(name = "yosys-slang", version = "0.0.0", dev_dependency = True)
173162

174163
# --- Extensions ---
175164

MODULE.bazel.lock

Lines changed: 35 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bazel/install.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,21 @@ fi
6161
ABS_DEST="$(realpath "$DEST_DIR")"
6262
echo "OpenROAD binary installed to $ABS_DEST"
6363

64+
# Install man pages (cat/ and html/ generated by //docs:man_pages).
65+
MAN_CAT_SRC="$(rlocation openroad/docs/man_pages/cat 2>/dev/null || true)"
66+
if [ -n "$MAN_CAT_SRC" ] && [ -d "$MAN_CAT_SRC" ]; then
67+
MAN_DIR="$ABS_DEST/share/openroad/man"
68+
mkdir -p "$MAN_DIR"
69+
rm -rf "$MAN_DIR/cat"
70+
cp -rf "$MAN_CAT_SRC" "$MAN_DIR/"
71+
MAN_HTML_SRC="$(rlocation openroad/docs/man_pages/html 2>/dev/null || true)"
72+
if [ -n "$MAN_HTML_SRC" ] && [ -d "$MAN_HTML_SRC" ]; then
73+
rm -rf "$MAN_DIR/html"
74+
cp -rf "$MAN_HTML_SRC" "$MAN_DIR/"
75+
fi
76+
echo "OpenROAD man pages installed to $MAN_DIR"
77+
fi
78+
6479
# Remove any previously installed desktop entry and icon before (re)installing,
6580
# mirroring the binary artifact cleanup above. This runs unconditionally so a
6681
# prior GUI install is cleaned up even when the current install is not a GUI

bazel/man_pages.bzl

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ the real work is delegated to the `bazel-manpages` Makefile target.
1010
Host requirements: pandoc, nroff (groff), col (bsdextrautils), python3>=3.10.
1111
"""
1212

13+
def _man_pages_resource_set(_os, _num_inputs):
14+
# The 'cat web' make below fans out with -j$(nproc), so this action uses
15+
# the whole host. Reserve all local CPUs to keep Bazel from co-scheduling
16+
# other heavy actions alongside it and oversubscribing the machine. Bazel
17+
# clamps the request to the cores actually available, so this is safe on
18+
# small CI hosts too.
19+
return {"cpu": 512.0}
20+
1321
def _man_pages_impl(ctx):
1422
cat_dir = ctx.actions.declare_directory("cat")
1523
html_dir = ctx.actions.declare_directory("html")
@@ -18,14 +26,25 @@ def _man_pages_impl(ctx):
1826
set -euo pipefail
1927
CAT_OUT="$PWD/{cat_out}"
2028
HTML_OUT="$PWD/{html_out}"
21-
make --no-print-directory -C docs -f Makefile bazel-manpages \\
29+
# Two phases: 'preprocess' (serial) generates the md/man*/*.md sources, then
30+
# 'cat web' fan out pandoc/nroff in parallel. They cannot share one -j make
31+
# invocation: cat/web read the md files preprocess produces, and a parallel
32+
# build has no dependency edge forcing preprocess to finish first. Running
33+
# 'cat web' as a second invocation also re-parses the Makefile so its
34+
# $(wildcard md/man*/*.md) picks up the freshly generated sources.
35+
# nproc is GNU coreutils (absent on stock macOS); fall back to sysctl, then 4.
36+
JOBS="$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)"
37+
make --no-print-directory -C docs -f Makefile preprocess \\
38+
CAT_ROOT_DIR="$CAT_OUT" HTML_ROOT_DIR="$HTML_OUT"
39+
make --no-print-directory -j"$JOBS" -C docs -f Makefile cat web \\
2240
CAT_ROOT_DIR="$CAT_OUT" HTML_ROOT_DIR="$HTML_OUT"
2341
""".format(
2442
cat_out = cat_dir.path,
2543
html_out = html_dir.path,
2644
)
2745

2846
ctx.actions.run_shell(
47+
resource_set = _man_pages_resource_set,
2948
outputs = [cat_dir, html_dir],
3049
inputs = ctx.files.docs_srcs + ctx.files.scripts + ctx.files.readmes + ctx.files.messages,
3150
command = command,

bazel/tcl_encode_or.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ tcl_encode = rule(
4848
doc = "Files to be wrapped.",
4949
),
5050
"_encode_script": attr.label(
51-
default = "//etc:file_to_string",
51+
default = "//etc:file_to_string.py",
5252
executable = True,
53-
allow_files = True,
53+
allow_single_file = [".py"],
5454
cfg = "exec",
5555
),
5656
},

0 commit comments

Comments
 (0)