Skip to content

QuickEst repository: Quick Quality of Results Estimation

License

Notifications You must be signed in to change notification settings

neroyouqiang/QuickEst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

QuickEst

Publication


If you use QuickEst in your research, please cite our FCCM'18 paper:

  @article{dai-hls-qor-fccm2018,
    title   = "{Fast and Accurate Estimation of Quality of Results in 
                High-Level Synthesis with Machine Learning}",
    author  = {Steve Dai and Yuan Zhou and Hang Zhang and Ecenur Ustun and 
               Evangeline F.Y. Young and Zhiru Zhang},
    journal = {Int'l Symp. on Field-Programmable Custom Computing Machines
               (FCCM)},
    month   = {May},
    year    = {2018},
  }

Usage

QuickEst is organized into directories for different estimation tasks.

HLS

hls directory currently supports resource estimation and timing classification for HLS. The python files for these features are in [path to top directory]/hls.

To preprocess our raw data and generate training and test datasets, run preprocess.py with the relevant options:

python preprocessing.py --data_dir [raw data directory containing 
                                    data.csv and feature_names.txt]
                        --output_dir [output data directory containing 
                                      .pkl files for main.py]

To run L1 feature selection, training, and/or testing for resource estimation and/or timing classification, run main.py with the relevant options:

usage: main.py [-h] [--data_dir DATA_DIR] [--predict_area] [--classify_timing]
               [--train] [--store_model_path STORE_MODEL_PATH] [--test]
               [--pretrained_model_path PRETRAINED_MODEL_PATH]
               [--feature_select]

optional arguments:
  -h, --help            show this help message and exit
  --data_dir DATA_DIR   Directory to the input dataset.
  --predict_area        Run area estimation.
  --classify_timing     Run timing classification.
  --train               Run training for the specified task.
  --store_model_path STORE_MODEL_PATH
                        Path to store the trained models
  --test                Run test for the specified task. Should use with the 
                        '--pretrained_model_path' option.
  --pretrained_model_path PRETRAINED_MODEL_PATH
                        Path to pretrained models. The models should be dumped
                        in pickle files.
  --feature_select      Use feature selection. If this option is used with 
                        '--train', the generated model would contain a mask
                        indicating the selected features. If used with 
                        '--test', then the produced model must provide the 
                        mask as well.

If you have some pretrained models and want to test them on the dataset, please make sure:

  1. Your models are dumped out using pickle and stored in a .pkl file;

  2. Your .pkl file should contain a dictionary indexed by string, where each string is mapped to a (list of) models. Below is an example:

  models = {
    'xgb': [xgb_model_0, xgb_model_1, xgb_model_2, xgb_model_3],
    'ann': [ann_model_0, ann_model_1, ann_model_2, ann_model_3]
  }
  1. If feature selection has been applied when training your models, please provide a mask containing the column indices of the selected features. The mask should be stored in the selected_mask field of the dictionary. Below is an example:
  models = {
    'xgb': [xgb_model_0, xgb_model_1, xgb_model_2, xgb_model_3],
    'ann': [ann_model_0, ann_model_1, ann_model_2, ann_model_3]
    'selected_mask': [0 1 2 4 8 10]
    # use the 0th, 1st, 2nd, 4th, 8th, and the 10th column of the features
  }

About

QuickEst repository: Quick Quality of Results Estimation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages