Skip to content

cuhk-eda/Dr-Guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dr. Guide

Dr. Guide is a generative AI framework for VLSI routing problems developed by the research team supervised by Prof. Evangeline F.Y. Young at The Chinese University of Hong Kong (CUHK).

It attempts to generate detailed co-planned route guides for multiple nets simultaneously, to facilitate good routing resource allocation and good net cooperation strategies, thereby accelerating/improving the routing process. The following figure illustrates the basic philosophy (see our paper for more details):

Coming soon

Since some features are further used in extensions we are currently working on, we will release them later.

Available now:

  • Model source code
  • Trained model checkpoints
  • Inference/generation script

See you soon:

  • Data set & training script
  • Source code for integration into routers

Usage

We use $ROOT to represent the root directory.

Set up environment

$ git clone https://github.com/cuhk-eda/Dr-Guide.git
$ pip install -r requirements.txt

Besides, download LibTorch that suits your cuda version from PyTorch Website, and unzip it.

Trace model

Download trained model checkpoints from Google Drive and place it in $ROOT/model, then run the tracing script as follows.

$ cd $ROOT/model
$ python trace_script.py --gpu $GPU_ID

Due to the characteristics of LibTorch, please make sure that the $GPU_ID used here for model tracing is the same as the one used for generation later. It will produce traced files for the auto-encoder model (traced_ae_s128_h512_{$GPU_ID}.pt) and the flow-matching model (traced_fm_s128_h512_{$GPU_ID}.pt), respectively.

Build

$ cd $ROOT
$ mkdir build && cd build
$ cmake -DCMAKE_PREFIX_PATH="path/to/your/libtorch" ..
$ make

Please specify your downloaded and unzipped LibTorch folder after -DCMAKE_PREFIX_PATH=. This build will produce an executable in $ROOT/build named dr_guide.

The main function in the source file $ROOT/dr_guide.cpp provides an example to demonstrate the steps to perform routing generation. You can freely customize the physical-pin, boundary-pin and blockage inputs in it. Please refer to our paper for more details about these components.

Run

$ cd $ROOT/build && mkdir -p result
$ CUDA_VISIBLE_DEVICES=$GPU_ID ./dr_guide

After execution, an image named route.png visualizing the generated routing results will be saved in $ROOT/build/result.

In the image, the sub-images from left to right in each row represent the generated routing results of each net from lowest to highest layers. The routes, pins, and blockages will be colored in red, green and blue, respectively.

Citation

If Dr. Guide is helpful for your research, please consider to cite:

  • Qijing Wang, Wing Ho Lau, Tsung-Yi Ho, Evangeline F.Y. Young, and Martin D.F. Wong, "Dr. Guide: AI-Guided Detailed Routing", In the 7th ACM/IEEE International Symposium on Machine Learning for CAD (MLCAD), 2025.

Acknowledgement

Thanks to everyone who makes their code available:

Contact

Qijing Wang ([email protected])

About

A generative AI framework for VLSI routing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published