| cmake | ||
| cpp_to_py | ||
| data | ||
| img | ||
| src | ||
| thirdparty | ||
| tool | ||
| utils | ||
| .gitignore | ||
| .gitmodules | ||
| BENCHMARK.md | ||
| CMakeLists.txt | ||
| LICENSE | ||
| main.py | ||
| README.md | ||
Xplace: An Extremely Fast and Extensible Global Placement Framework
News 🚀
We are happy to announce that Xplace 2.0 is now released. Comparing to Xplace 1.0, this version supports the following new features:
- Support deterministic mode with only 5~25% extra GP runtime overhead.
- Implement an extremly fast GPU-accelerated detailed-routability-driven placement algorithm.
- Integrate with a GPU-accelerated detailed placer and a GPU-accelerated global router.
- Provide benchmark download and preprocess scripts, and three routability evalution scripts.
- Code refactoring.
😄 Detailed Experimental results of Xplace 2.0 are given in BENCHMARK.md.
About
Xplace is a fast and extensible GPU accelerated global placement framework developed by the research team supervised by Prof. Evangeline F. Y. Young at The Chinese University of Hong Kong (CUHK). It achieves around 3x speedup per GP iteration compared to DREAMPlace and shows high extensiblity.
As shown in the following figure, Xplace framework is built on top of PyTorch and consists of serveral independent modules. One can easily extend Xplace by applying new scheduling techniques, new gradient functions, new placement metrics and so on.
More details are in the following paper:
Lixin Liu, Bangqi Fu, Martin D. F. Wong, and Evangeline F. Y. Young. "Xplace: an extremely fast and extensible global placement framework". In Proceedings of the 59th ACM/IEEE Design Automation Conference (DAC '22). Association for Computing Machinery, New York, NY, USA, 1309–1314.
(For the Xplace-NN, please refer to branch neural)
Requirements
- CMake >= 3.12
- GCC >= 7.5.0
- Boost >= 1.56.0
- CUDA >= 11.3
- Python >= 3.8
- PyTorch >= 1.12.0
- Cairo
- Innovus® (version 20.14, optional, for detailed routing and design rule checking)
Setup
- Clone the Xplace repository. We'll call the directory that you cloned Xplace as
$XPLACE_HOME.
git clone --recursive https://github.com/cuhk-eda/Xplace
- Build the shared libraries used in Xplace.
cd $XPLACE_HOME
mkdir build && cd build
cmake -DPYTHON_EXECUTABLE=$(which python) ..
make -j40 && make install
Prepare Data
The following script will automatically download ispd2005, ispd2015 and iccad2019 in ./data/raw. It also preprocesses ispd2015 benchmark to fix some errors reported by Innovus.
cd $XPLACE_HOME/data
./download_data.sh
Get started
- To run GP + DP flow for ISPD2005 dataset:
# only run adaptec1
python main.py --dataset ispd2005 --design_name adaptec1 --load_from_raw True --detail_placement True
# run all the designs in ispd2005
python main.py --dataset ispd2005 --run_all True --load_from_raw True --detail_placement True
- To run GP + DP flow for ISPD2015 dataset:
# only run mgc_fft_1
python main.py --dataset ispd2015_fix --design_name mgc_fft_1 --load_from_raw True --detail_placement True
# run all the designs in ispd2015
python main.py --dataset ispd2015_fix --run_all True --load_from_raw True --detail_placement True
- To run Routability GP + DP flow for ISPD2015 dataset:
# run all the designs in ispd2015 with routability optimization
python main.py --dataset ispd2015_fix --run_all True --load_from_raw True --detail_placement True --use_cell_inflate True
NOTE: we defaultly enable the deterministic mode. If you don't need determinism and want to run placement in an extremely fast mode, please try to set --deterministic False in the python arguments.
- Each run will generate serveral output files in
./result/exp_id. These files can provide valuable information for parameter tuning.
In ./result/exp_id
- eval # parameter curves and the visualization of placement
- log # log and statistics
- output # global placement solution files
Parameters
Please refer to main.py.
Load design from preprocessed pt file (Optional)
The following script will dump the parsed design into a single torch pt file so Xplace can load the design from the pt file instead of parsing the input file from scratch.
cd $XPLACE_HOME/data
python utils/convert_design_to_torch_data.py --dataset ispd2005
python utils/convert_design_to_torch_data.py --dataset ispd2015_fix
python utils/convert_design_to_torch_data.py --dataset iccad2019
Preprocessed data is saved in ./data/cad.
When developing a new global placement technique in Xplace, we highly suggest using the pt mode to save the parser time. (set --load_from_raw False)
python main.py --dataset ispd2005 --run_all True --load_from_raw False
Note:
- Please remember to use the raw mode (set
--load_from_raw True) when measuring the total running time. - We currently not support
ptmode in routability-driven mode.
Evaluate the Routability of Xplace's Solution
We provide three ways to evaluate the routability:
-
Set
--final_route_eval Truein python arguments to invoke the internal global router GGR to evaluate the placement solution. The evaluation metrics are reported in the log and recorded in./result/exp_id/log/route.csv. Besies, the route guide file is written in./result/exp_id/output/design_name.guideand
More details about using GGR in Xplace can be found in cpp_to_py/gpugr. -
Use CU-GR to global route the placement solution. refer to tool/cugr_ispd2015_fix for more instructions.
-
(Optional). If Innovus® has been properly installed in your OS, you may try to use Innovus® to detailedly route the placement solution. Please refer to tool/innovus_ispd2015_fix for more instructions.
Citation
If you find Xplace useful in your research, please consider to cite:
@inproceedings{liu2022xplace,
author={Liu, Lixin and Fu, Bangqi and Wong, Martin D. F. and Young, Evangeline F. Y.},
booktitle={Proceedings of the 59th ACM/IEEE Design Automation Conference},
title={Xplace: An Extremely Fast and Extensible Global Placement Framework},
year={2022},
}
Thanks the authors of ePlace, RePlAce, and DREAMPlace for their great work.
@article{lu2015eplace,
author={Lu, Jingwei and Chen, Pengwen and Chang, Chin-Chih and Sha, Lu and Huang, Dennis Jen-Hsin and Teng, Chin-Chi and Cheng, Chung-Kuan},
journal={ACM Trans. Des. Autom. Electron. Syst.},
title={ePlace: Electrostatics-Based Placement Using Fast Fourier Transform and Nesterov's Method},
year={2015},
}
@article{cheng2019replace,
author={Cheng, Chung-Kuan and Kahng, Andrew B. and Kang, Ilgweon and Wang, Lutong},
journal={IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems},
title={RePlAce: Advancing Solution Quality and Routability Validation in Global Placement},
year={2019},
}
@article{lin2021dreamplace,
author={Lin, Yibo and Jiang, Zixuan and Gu, Jiaqi and Li, Wuxi and Dhar, Shounak and Ren, Haoxing and Khailany, Brucek and Pan, David Z.},
journal={IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems},
title={DREAMPlace: Deep Learning Toolkit-Enabled GPU Acceleration for Modern VLSI Placement},
year={2021},
}
Contact
Lixin Liu (lxliu@cse.cuhk.edu.hk) and Bangqi Fu (bqfu21@cse.cuhk.edu.hk)
License
Xplace is an open source project licensed under a BSD 3-Clause License that can be found in the LICENSE file.
