Skip to content

EMCLab-Sinica/Intermittent-aware-NAS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iNAS : Intermittent-aware Neural Architecture Search

Overview

This repository contains iNAS, a neural architecture search (NAS) framework which finds deep neural networks (DNNs) that can be feasibly deployed and executed on intermittently-powered systems. iNAS co-explores the neural architecture, execution design and preservation design spaces to find highly accurate DNNs that can safely and efficiently execute under intermittent power.

We develop iNAS on top of an existing hardware-aware NAS (as published in DAC 2019), where we adapt the NAS controller and DNN Trainer, as well as introduce the following two key components to introduce intermittent execution behavior into NAS:

  • Intermittent-aware Execution Design Explorer (iNAS-Exp)
  • Intermittent-aware Abstract Performance Model (iNAS-PMod)

NAS iteratively generates child networks. For each child network, iNAS-Exp explores the execution design and preservation design spaces, and uses the energy budget, hardware specification and latency requirement as search constraints. iNAS-PMod derives the end-to-end inference latency of a the child network and corresponding intermittent execution design, by considering all additional key costs related to progress preservation and progress recovery.

The derived iNAS solutions (i.e., network models with associated intermittent execution designs) are deployed on the Texas Instruments MSP430FR5994 LaunchPad and executed using an intermittent inference library that is also included in this repository.

A demo video comparing solutions found by iNAS and a hardware-aware NAS can be found here

Please cite/refer to this paper for more information:
Hashan Roshantha Mendis, Chih-Kai Kang, and Pi-Cheng Hsiu, "Intermittent-Aware Neural Architecture Search," to appear in ACM Transactions on Embedded Computing Systems, (Integrated with IEEE/ACM CODES+ISSS 2021)

Table of Contents

Directory/File Structure

Below is an explanation of the directories/files found in this repository.

iNAS/NASBase contains the implementation for the NAS Controller and DNN Trainer, adapted from the hardware-aware NAS engine.
iNAS/IEExplorer contains the implementation for the iNAS-Exp
iNAS/CostModel contains the implementation for the iNAS-PMod
iNAS/DNNDumper is a helper module used to convert the derived solutions into a custom C data structure recognizable by the intermittent inference runtime library
iNAS/misc_scripts contains miscellaneous helper scripts
iNAS/run_scripts contains scripts to help deploy and execute iNAS and related experiments on a GPU server
iNAS/settings_files contains the settings used for evaluation (on 3 datasets)
iNAS/solution_dump is the solution output directory
iNAS/trial_log is the directory used to output log info per trial
iNAS/main.py is the iNAS main entry file
iNAS/settings.py contains the implementation for managing/loading settings files
iNAS/clean_all.sh is a script to clear all temporary files generated by iNAS
iNAS/example_run.sh is an example script that shows an iNAS run
iNAS/requirements_pip.txt contains the dependencies required to run iNAS
intermittent-inference-library contains the intermittent inference runtime library developed for the TI-MSP430FR5994 (currently supports convolution, global pooling and fully connected layers)

Getting Started

Prerequisites

iNAS

iNAS is implemented using Python 3.7, so we recommend installing the Anaconda distribution of Python and related packages. The required dependencies to run iNAS can be found in the included iNAS/requirements_pip.txt file.

Intermittent Inference Library

Here is the basic software and hardware needed to build/run the intermittent inference runtime library.

Setup and Build

iNAS
  1. Download/clone this repository
  2. Install Anaconda Python distribution
  3. [Create and activate] (https://conda.io/projects/conda/en/latest/user-guide/getting-started.html) virtual environment
  4. Install dependencies pip install -r requirements.txt
  5. Run iNAS example: iNAS/example_run.sh
Intermittent Inference Library
  1. Download/clone this repository
  2. Download Driver & DSP library from http://www.ti.com/
  3. Import this project to your workspace of code composer studio (CCS).
  4. Add PATH_TO_DSPLIB & PATH_TO_DIRVERLIB to library search path

Contributors

This project is led by Dr. Pi-Cheng Hsiu (Academia Sinica). Listed below are the contributors.

Hashan Roshantha Mendis (Academia Sinica, Taiwan)
Chih-Kai Kang (Academia Sinica and National Taiwan University, Taiwan)
Pi-Cheng Hsiu (Academia Sinica, National Taiwan University and National Chi Nan University, Taiwan)

Contact

If you have any questions or comments, please contact Hashan Roshantha Mendis at [email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published