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.
- conda env create -f environment.yml
- conda activate latency_predict_env
- jupyter notebook
- Open tutorial/latency_prediction_demo.ipynb
- Run all
-
latency_prediction_demo.ipynb
- Jupyter notebook Demo with steps to run Dataset Creation, Model Evaluation, and OFA NAS
- Lists all necessary dependencies for project -
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 -
latency_NAS_runner.py
- Similar code to demo jupyter notebook. Prepares and run code to perform NAS -
evolution_finder.py (modified)
- this file was modified to include create_latency_dataset() -
checkpoints/
- latency_prediction_model/
- contains all trained latency predictors organized in subfolders of hardware and search spaces
- latency_prediction_model/
-
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
- datasets/