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):
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
We use $ROOT to represent the root directory.
$ git clone https://github.com/cuhk-eda/Dr-Guide.git$ pip install -r requirements.txtBesides, download LibTorch that suits your cuda version from PyTorch Website, and unzip it.
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_IDDue 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.
$ cd $ROOT
$ mkdir build && cd build
$ cmake -DCMAKE_PREFIX_PATH="path/to/your/libtorch" ..
$ makePlease 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.
$ cd $ROOT/build && mkdir -p result
$ CUDA_VISIBLE_DEVICES=$GPU_ID ./dr_guideAfter 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.
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.
Thanks to everyone who makes their code available:
Qijing Wang ([email protected])
