Skip to content

RhythmSyed/NAS_PerformanceEstimation

Repository files navigation

NAS_PerformanceEstimation

Generalized Latency Performance Estimation for Once-For-All Neural Architecture Search

This implementation is adopted from the source code of Once For All (Cai et al. 2019) and CompOFA (Sahni et al. 2021)

We created a jupyter_notebook: latency_prediction_demo.ipynb which run through all the required steps to show a working version of the code base.

Setup

  1. conda env create -f environment.yml
  2. conda activate latency_predict_env
  3. jupyter notebook
  4. Open tutorial/latency_prediction_demo.ipynb
  5. Run all

Description of relevant files

  1. latency_prediction_demo.ipynb
    - Jupyter notebook Demo with steps to run Dataset Creation, Model Evaluation, and OFA NAS
    - Lists all necessary dependencies for project

  2. latency_predictor_driver.py
    - Provides code to create latency datasets. Uses imports from evolution_finder to random sample OFA, CompOFA
    - Code for inference time analysis of latency predictor and measurement

  3. latency_NAS_runner.py
    - Similar code to demo jupyter notebook. Prepares and run code to perform NAS

  4. evolution_finder.py (modified)
    - this file was modified to include create_latency_dataset()

  5. checkpoints/

    • latency_prediction_model/
            - contains all trained latency predictors organized in subfolders of hardware and search spaces
  6. latency_predictor/\

    • datasets/
            - contains all datasets created for this project, organized into device subfolders. Also includes GPU generalization datasets
    • model_results/
            - includes images and text files of all experimental results organized in subfolders
    • generalized_dataset_combine.py
            - helper code to add hardware parameters to datasets
    • Iterations.txt
            - Log file from search
    • latency_encoding.py
            - helper code to perform one hot encoding of child architectures
    • latency_finetune.py
            - code for training fine tuned models, case studies, and plotting loss curves
    • latency_predictor.py
            - code for creating latency predictors, data_preprocessing, training using RayTune, testing
    • latency_predictor_generalized.py
            - code for creating generalized latency predictors
    • lookup_table_calculation.py
            - helper code to calculate time taken to create lookup table
    • other images are results from various experiments

About

Generalized Latency Performance Estimation for Once-For-All Neural Architecture Search

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published