Giter Site home page Giter Site logo

lapnd / tinymlperf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ai-vector-accelerator/tinymlperf

0.0 0.0 0.0 7.1 MB

A fork of TinyMLPerf modified to use our of TensorFlow Lite for Microcontrollers utilises a part of the RISC-V Vector Extension to improve performance.

Shell 0.06% C++ 97.20% Python 0.86% C 0.10% Assembly 0.04% Makefile 0.15% Jupyter Notebook 1.59%

tinymlperf's Introduction

tinyMLPerf Deep Learning Benchmarks for Embedded Devices

The goal of TinyMLPerf is to provide a representative set of deep neural nets and benchmarking code to compare performance between embedded devices. Embedded devices include microcontrollers, DSPs, and tiny NN accelerators. These devics typically run at between 10MHz and 250MHz, and can perform inference using less then 50mW of power.

TinyMLPerf submissions will allow device makers and researchers to choose the best hardware for their use case, and allows hardware vendors to showcase their offerings.

TinyMLPerf is primarily intended to benchmark hardware rather than new network archietctures, or embedded neural net runtimes. The reference benchmarks are provided using TensorFlow Lite for Microcontrollers (TFLM). Submitters can directly use the TFLM, although submitters are encouraged to use the software stack that works best on thier hardware.

CV32E40P Compilation

Setup

The following commands will install the dependencies for this repository

sudo apt install unzip curl

Building for CV32E40P Verilator Model

To build TinyMLPerf you must first navigate to the ./v0.1 directory.

cd ./v0.1

Build for Standard ISA CV32E40P

make TARGET_ARCH=cv32e40p                                                       # Build the ELF File
riscv32-unknown-elf-objcopy -O verilog ./vww_perf_runner vww_perf_runner.hex    # Convert to HEX
testbench_verilator "+firmware=./vww_perf_runner.hex"                           # Execute on Verilator Model

Build for ML Accelerated CV32E40P

make TARGET_ARCH=cv32e40p-ml                                                    # Build the ELF File
riscv32-unknown-elf-objcopy -O verilog ./vww_perf_runner vww_perf_runner.hex    # Convert to HEX
testbench_verilator "+firmware=./vww_perf_runner.hex"                           # Execute on Verilator Model

Building for Spike

To build TinyMLPerf you must first navigate to the ./v0.1 directory.

cd ./v0.1

Build for Standard ISA CV32E40P

make TARGET_ARCH=cv32e40p TAGS=spike                                                                        # Build the ELF File    
spike --isa=RV32IMCV --varch=vlen:32,elen:32,slen:32 /opt/riscv/riscv32-unknown-elf/bin/pk vww_perf_runner  # Execute on Spike set to mimic CV32E40P

Build for ML Accelerated CV32E40P

make TARGET_ARCH=cv32e40p-ml TAGS=spike                                                                     # Build the ELF File    
spike --isa=RV32IMCV --varch=vlen:32,elen:32,slen:32 /opt/riscv/riscv32-unknown-elf/bin/pk vww_perf_runner  # Execute on Spike set to mimic CV32E40P

Specify TensorFlow Version

These instructions allow a user to specify the version of TensorFlow on which TinyMLPerf is run.

  1. Find the hash/sha of the commit you would like to use. This can be on any branch, not just master.
  2. Open the file v0.1/example_submission/download_and_build_tfmicro.sh
  3. Replace the value of the variable TF_COMMIT_SHA with the hash/sha you found in step 1.
  4. run make clean from within the dir ./v0.1 and delete the directory v0.1/example_submission/tensorflow
    This will ensure the new version of TensorFlow will be downloaded when the next make command is run.

tinymlperf's People

Contributors

colbybanbury avatar cskiraly avatar jeremy-syn avatar jsh1g17 avatar njeffrie avatar palexander23 avatar profvjreddi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.