Endeavour10020 / CircuitFormer

[NeurIPS 2023] CircuitFormer: Circuit as Set of Points

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CircuitFormer

Circuit as Set of Points

Jialv Zou1 , Xinggang Wang1 πŸ“§ , Jiahao Guo1 , Wenyu Liu1 , Qian Zhang2 , Chang Huang2

1 School of EIC, HUST, 2 Horizon Robotics

(πŸ“§) corresponding author.

NeurIPS 2023

ArXiv Preprint

Abstract

As the size of circuit designs continues to grow rapidly, artificial intelligence technologies are being extensively used in Electronic Design Automation (EDA) to assist with circuit design. Placement and routing are the most time-consuming parts of the physical design process, and how to quickly evaluate the placement has become a hot research topic. Prior works either transformed circuit designs into images using hand-crafted methods and then used Convolutional Neural Networks (CNN) to extract features, which are limited by the quality of the hand-crafted methods and could not achieve end-to-end training, or treated the circuit design as a graph structure and used Graph Neural Networks (GNN) to extract features, which require time-consuming preprocessing. In our work, we propose a novel perspective for circuit design by treating circuit components as point clouds and using Transformer-based point cloud perception methods to extract features from the circuit. This approach enables direct feature extraction from raw data without any preprocessing, allows for end-to-end training, and results in high performance. Experimental results show that our method achieves state-of-the-art performance in congestion prediction tasks on both the CircuitNet and ISPD2015 datasets, as well as in design rule check (DRC) violation prediction tasks on the CircuitNet dataset. Our method establishes a bridge between the relatively mature point cloud perception methods and the fast-developing EDA algorithms, enabling us to leverage more collective intelligence to solve this task.

Installation

a. Create a conda virtual environment and activate it.

conda create -n circuitformer python=3.9 -y
conda activate circuitformer

b. Install PyTorch and torchvision following the official instructions.

pip install torch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 -f https://download.pytorch.org/whl/torch_stable.html

c. Install torch_scatter and spconv.

  • You could install torch_scatter with pip, see the official documents of torch_scatter.
  • You could install latest spconv v2.x with pip, see the official documents of spconv.

d. Install other requirements.

pip install -r requirement.txt

e. Prepare pretrained models.

mkdir ckpts

cd ckpts 
wget https://download.pytorch.org/models/resnet18-f37072fd.pth

Prepare Dataset

Please download CircuitNet-N28 dataset follow the guide of CircuitNet

Folder structure

circuitformer
β”œβ”€β”€ dataset/
β”‚   β”œβ”€β”€ CircuitNet/
β”‚   β”‚   β”œβ”€β”€ graph_features/
|   |   |   β”œβ”€β”€ instance_placement/
β”‚   β”‚   β”œβ”€β”€ train_congestion/
β”‚   β”‚   β”‚   β”œβ”€β”€ congestion/
β”‚   β”‚   β”‚   |   β”œβ”€β”€ feature/
β”‚   β”‚   β”‚   |   β”œβ”€β”€ label/
β”‚   β”‚   β”œβ”€β”€ train_DRC/
β”‚   β”‚   β”‚   β”œβ”€β”€ DRC/
β”‚   β”‚   β”‚   |   β”œβ”€β”€ feature/
β”‚   β”‚   β”‚   |   β”œβ”€β”€ label/

Train and Test

Train circuitformer

python train.py

Please download our pretrain model Here and put it in 'ckpts/'

Test circuitformer

python test.py

Acknowledgment

The dataset is provided by CircuitNet. Our code is developed based on VoxSeT and segmentation_models.pytorch

About

[NeurIPS 2023] CircuitFormer: Circuit as Set of Points


Languages

Language:Python 100.0%