Skip to content

Bazel- and CMake-built openroad from the same source produce different QoR #10336

Description

@oharboe

What

floorplan_gcd_sky130hd_base.tar.gz

Same OpenROAD source (45b7772) built two ways gives different QoR on the same input.

Reproduction

sky130hd/gcd through make finish, three consecutive runs of each binary:

Build tns max wns max runs identical
./build_openroad.sh (CMake) -76.42 -1.72 3/3
bazelisk build //:openroad (root: tools/OpenROAD) -76.45 -1.71 3/3

Each build is deterministic in isolation.

Floorplan stage outputs match byte-for-byte. The divergence first appears later in the flow.

Untar floorplan_gcd_sky130hd_base.tar.gz

# Build A: CMake
./build_openroad.sh
OR_CMAKE=$(realpath tools/install/OpenROAD/bin/openroad)

# Build B: Bazel (run from tools/OpenROAD/)
( cd tools/OpenROAD && bazelisk build //:openroad )
OR_BAZEL=$(realpath tools/OpenROAD/bazel-bin/openroad)

cd flow
for or in $OR_CMAKE $OR_BAZEL; do
    rm -rf logs/sky130hd/gcd objects/sky130hd/gcd reports/sky130hd/gcd results/sky130hd/gcd
    OPENROAD_EXE=$or make DESIGN_CONFIG=designs/sky130hd/gcd/config.mk finish > /dev/null 2>&1
    echo "$(basename $or) ($(stat -c%s $or)B): $(grep 'tns max\|wns max' reports/sky130hd/gcd/base/6_finish.rpt | tr '\n' ' ')"
done

Amplification on harder designs

Same setup, larger designs:

Design finish__timing__setup__tns (CMake) (Bazel)
nangate45/bp_fe_top -1.21838 -16.0461
nangate45/mempool_group -11515.9 -23362.2

The 0.04% drift on gcd compounds through placement/CTS/routing into multi-x deltas.

Build environment delta

Same source, same tools/OpenROAD/.bazelrc and tools/OpenROAD/CMakeLists.txt. The two builds differ in:

  • toolchain — CMake uses the system clang++ 18.1; Bazel uses toolchains_llvm 1.5.0 → LLVM 20.1.8.
  • linked deps — CMake uses system Boost / abseil / spdlog / tcmalloc / libomp; Bazel pins all of them via BCR.
  • cxx flags via tools/OpenROAD/.bazelrc vs the CMake build's defaults.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions