Yikang Ouyang, Sicheng Li, Dongsheng Zuo, Hanwei Fan, Yuzhe Ma. In 2023 ACM/IEEE 5th Workshop on Machine Learning for CAD (MLCAD), paper.
Contact: youyang929 [
- EPFL 15 benchmark EPFL15
- ISCAS 85 Dataset ISCAS85
- Online adder generator Adder
- In-house multipliers with compressor trees.
The required python environment is shown in requirements.txt
, the python version is 3.9.16. Some packages are out-of-dated so you may install them mannually.
For GPU support, please refer to official channel of PyG and PyTorch and download the version that suits your CUDA version; PyG, PyTorch
CUDA must be install in your computer for GPU support, our cuda version is cuda 11.7.
Opensource EDA tools needed: yosys, abc.
-
Preprocessing RTL into graphs
cd 0_prepare_dataset ./graph_dataset_gen.sh
This will generate graph data for MAPE evaluation, the designs are listed in
0_prepare_dataset/designlist.txt
For datapath designs, please modify paths in python scripts executed in
graph_dataset_gen.sh
and changedesigns
todatapath
,designlist.txt
todatapah_list.txt
. -
Synthesizing sequences
You may synthesize sequences to obtain delay and area by your own, or you can directly use our synthesized sequence dataset. The library for synthesizing can be found in scale-lab/DRiLLS#10 or LOSTIN. Synthesizing sequence (This requries many cores and much time):
cd 0_prepare_dataset/sequence/run_abc python run_abc_syn.py #After synthesizing with those sequences, you may merge results for each design into a single csv file 0_prepare_dataset/sequence/process_dataset/collect_design.ipynb
Alternatively, you can directly use the synthesized sequence with delay and area labels.
tar -zxvf abc_synthesized.tar.gz # The 39 designs for MAPE evaluation tar -zxvf datapath_synthesized.tar.gz # The 35 adders and 36 multipliers for design space exploration.
After obtaining the raw dataset, there are some preprocessing, like the split of train/valid/test sets. This can be found in
0_prepare_dataset/sequence/process_dataset/transform.py
, you can directly execute it, the generated dataset will be stored intemp
dir.
-
Training and inference:
cd model/mtl_model ./train_mtl.sh
If the "mode" in
train_mtl.sh
is set toboth
, it will do training and transductive testing, if set toall
, it will do training, transductive testing, and inductive testing. -
Models
Models are defined in
model/mtl_model/utils/gnn_cross.py
. For baseline models, please refer to LOSTIN.
This path contains scripts for computing hypervolumn for evaluating design space exploration results.
In model/mtl_model/stata/dse_pareto.py
, fill the model output log csv files and it can compute pareto frontier based on model prediction.
If you find our work helpful, please consider cite our work:
@INPROCEEDINGS{Ouyang2023ASAP,
author={Ouyang, Yikang and Li, Sicheng and Zuo, Dongsheng and Fan, Hanwei and Ma, Yuzhe},
booktitle={2023 ACM/IEEE 5th Workshop on Machine Learning for CAD (MLCAD)},
title={ASAP: Accurate Synthesis Analysis and Prediction with Multi-Task Learning},
year={2023},
pages={1-6},
}