Skip to content

EMCLab-Sinica/TiNAS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TiNAS : IMO Sensitive Neural Architecture Search

Overview

This repository contains TiNAS, an intermittent-aware neural architecture search (NAS) framework which balances intermittency management overhead (IMO) and accuracy. The DNN solutions can be feasibly deployed and executed on intermittently-powered systems. TiNAS leverages two key guidelines related to IMO sensitivity, i.e., the varying sensitivity towards IMO across different DNN characteristics.

  • Guideline 1: Reduce the search space by excluding architectural parameters with low IMO sensitivity, thus improving accuracy without increasing the IMO
  • Guideline 2: Focus the search on network blocks with high IMO sensitivity, to quickly find an intermittent-friendly DNN with high accuracy and low IMO

We build TiNAS on top of the integration between two state-of-the-art NAS frameworks, namely TinyNAS for MCUs and iNAS for intermittent systems. We adapt the search space optimizer and evolutionary search strategy of TinyNAS to incorporate the above two guidelines.

The derived TiNAS solutions 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 TiNAS and two variants (TiNAS-M: performing direct IMO minimization and TiNAS-U: unaware of IMO) can be found here

Table of Contents

Directory/File Structure

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

TiNAS/NASBase/ss_optimization contains the implementation for the search space optimizer (adapted from TinyNAS)
TiNAS/NASBase/evo_search contains the implementation for the evolutionary search strategy (adapted from TinyNAS)
TiNAS/NASBase/hw_cost contains the implementation for the intermittent inference cost model and intermittent execution design explorer (adapted from iNAS)
TiNAS/NASBase/model contains the search space definition, supernet and subnet structure
TiNAS/tools/imo_sensitivity contains the implementation for the IMO sensitivity analysis tool
TiNAS/DNNDumper is a helper module used to convert the derived solutions into a custom C data structure recognizable by the intermittent inference runtime library
TiNAS/settings contains the settings used for evaluation (for different datasets and baseline approaches)
TiNAS/settings.py contains the overall NAS settings and implementation for managing/loading settings files
TiNAS/misc_scripts contains miscellaneous helper scripts
TiNAS/requirements.txt contains the dependencies required to run TiNAS
intermittent-inference-library contains the intermittent inference runtime library developed for the TI-MSP430FR5994 (extended from iNAS's inference library)

Getting Started

Prerequisites

TiNAS

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

Intermittent Inference Library

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

Setup and Build

TiNAS
  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 TiNAS:
    python -m NASBase.run_nas --suffix cifar_example_run --settings settings/CIFAR10.json,settings/TiNAS-test.json --stages 1 --imcreq 0 --latreq 100 --ccap 0.005 --no-rlogger
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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published