Skip to content

Repository files navigation

GraphPlace: A Heterogeneous GNN-RL Framework for VLSI Macro Placement

GraphPlace is a high-performance framework that couples a Heterogeneous Graph Neural Network (GNN) with a vectorized Reinforcement Learning pipeline to optimize VLSI macro placement. By treating macro placement as a refinement task in a continuous space, GraphPlace resolve overlaps and optimizes congestion on industrial-scale designs in minutes.

Macro placement is a critical stage in chip design where the positions of functional blocks (memory arrays, IP cores) determine the quality of downstream routing. While traditional solvers like RePlAce or Simulated Annealing are effective, they are "cold-start" optimizers that require hours of computation for every new design.

GraphPlace addresses these challenges by encoding the netlist as a heterogeneous graph and training a GNN-RL agent to learn transferable placement heuristics. Leveraging GPU-native HPWL calculations and C++ K-Nearest Neighbor (KNN) spatial queries, the framework achieves unprecedented scalability, handling designs with over 200,000 nodes (ibm18) on a single commercial GPU.


Contents

  1. Architecture
  2. FAQ
  3. Future Improvements and Compute
  4. Installation and Setup
  5. Citations and Prior Work

Architecture

1. Introduction

Traditional approaches to macro placement treat each new chip as a isolated optimization problem. GraphPlace frames this as a sequential decision-making problem. However, unlike prior RL placers that are bottlenecked by expensive O(N²) wirelength calculations, GraphPlace introduces a vectorized pipeline that allows the agent to reason about connectivity, geometric constraints, and spatial congestion in a fraction of the time.

2. Graph Representation of Constraints

GraphPlace Heterogeneous Topology

The placement problem is encoded as a Heterogeneous Graph with three distinct node types: Macros, Nets, and Ports. This representation draws direct inspiration from the RL-MILP Solver (Lee & Kim, 2024), treating the macro placement canvas and netlist as a complex system of logical and integer constraints.

Star Expansion

GraphPlace utilizes a Star Expansion of the netlist hypergraph. In this bipartite-style topology, each net becomes a central hub connecting its participating members. However, unlike simpler models that only connect Macros to Nets, GraphPlace introduces Ports as an intermediate layer. This creates an effective Tripartite structure for message passing:

  • Macro <-> Net: captures global connectivity.
  • Port <-> Net: explicitly preserves physical pin offsets, which are critical for accurate wirelength and congestion estimation.

KNN Proximity Edges

To handle the physical reality of the chip canvas, GraphPlace superimposes a Spatial Layer on top of the netlist topology. During inference, the agent constructs Macro-to-Macro (near) edges using k-Nearest Neighbor (KNN) routines. This breaks the strict bipartite/tripartite abstraction of the netlist, allowing the GNN to reason about local density, spatial overlaps, and congestion zones in a non-linear continuous space.

By fusing these logical and spatial representations, the GNN learns to extract structural embeddings that guide the RL agent toward feasible, overlap-free solutions, paralleling the start primal heuristic methodology seen in modern MILP solvers.

3. PlaceGNN

In our framework, the Graph Neural Network (GNN) acts as a structural encoder that processes a heterogeneous graph containing three distinct node types: macros, nets, and ports. By utilizing relation-specific message passing instead of generic bipartite abstractions, the GNN explicitly preserves physical pin offsets at the ports while extracting logical connectivity from the net topology. The deeply learned embeddings from this structural extraction are then passed to a Multi-Layer Perceptron (MLP) head, which interfaces directly with our vectorized reinforcement learning environment. Instead of outputting unconstrained displacement distributions, the MLP outputs bounded "nudges" mapped to a continuous action space, enabling the RL agent to iteratively slide macros away from spatial congestion and overlap zones while minimizing the composite proxy cost.

4. Reinforcement Learning Pipeline using GYM

At each step, the RL agent evaluates the chip state and determines the optimal displacement for every macro. The environment provides rapid feedback by utilizing GPU-vectorized Half-Perimeter Wirelength (HPWL) for speed and optimized overlap penalties for high-throughput training. Furthermore, by training across the full IBM dataset, the agent achieves zero-shot generalization, learning generalized placement rules that can be applied to unseen topographies without retraining.


FAQ

Q: Why is GraphPlace better than traditional physical design solvers? A: Reusability. Traditional solvers start from a blank canvas every time. GraphPlace is a "warm-start" solver. It leverages pre-trained weights to output high-quality global placements in seconds, essentially acting as an AI-powered refinement layer for existing flow.

Q: What sets GraphPlace apart from previous academic RL placers? A: GPU-Native Scalability. Most RL placers are bottlenecked by CPU-side math. We vectorized the HPWL calculation and offloaded spatial queries to compiled C++ KNN routines, allowing us to process massive benchmarks like ibm18 with over 200,000 nodes on a single NVIDIA L4 GPU.


Future Improvements and Compute

While GraphPlace demonstrates state-of-the-art structural viability, its performance is currently bound by compute time. RL policies for VLSI typically require ~100,000 epochs for true mathematical convergence. Our current results (3,600 epochs on a single L4 over 4 hours) represent a baseline; we anticipate drastic improvements in placement quality and wirelength reduction when scaled to distributed A100/H100 clusters.


Installation and Setup

1. Clone and Environment

git clone https://github.com/ForceDrift/GraphPlace.git
cd GraphPlace
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

2. Running Training (3600+ Epochs)

python run_pipeline.py \
  --train-benchmarks ibm01 ibm02 ibm03 ibm04 ibm06 ibm07 ibm08 ibm09 ibm10 ibm11 ibm12 ibm13 ibm14 ibm15 ibm16 ibm17 ibm18 \
  --epochs 3600 \
  --steps 10

3. Running All Benchmarks

To evaluate the submission across the entire IBM ICCAD04 suite and generate a comparison table against SA and RePlAce baselines:

export PYTHONPATH=$PYTHONPATH:$(pwd):$(pwd)/externals/macro-place-challenge-2026
python3 -m macro_place.evaluate submissions/gnn_placer_submission.py --all

Running on all benchmarks produces a summary like:

--------------------------------------------------------------------------------
    Benchmark     Proxy        SA   RePlAce     vs SA  vs RePlAce  Overlaps
--------------------------------------------------------------------------------
        ibm01    1.1388    1.3166    0.9976    +13.5%      -14.1%         0
        ibm02    1.4007    1.9072    1.8370    +26.5%      +23.7%         0
        ...
          AVG    1.6214    2.1251    1.4578    +23.7%      -11.2%         0
--------------------------------------------------------------------------------

4. Running with Docker (Recommended)

For a fully reproducible environment with all dependencies pre-configured:

docker build -t graphplace .
docker run --gpus all graphplace python -m macro_place.evaluate submissions/gnn_placer_submission.py --all

Citations and Prior Work

This research builds upon the foundations of deep reinforcement learning in physical design and heterogeneous graph representation learning:


About

GraphPlace is a heterogeneous GNN-RL framework for VLSI macro placement

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages