Misby / nnPerfwins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nnPerf + TFLite Android Image Classifier App Demo

Homepage | Video Demo | Visualization tool | Citation |

nnPerf is a real-time on-device profiler designed to collect and analyze the DNN model runtime inference latency on mobile platforms. nnPerf demystifies the hidden layers and metrics used for pursuing DNN optimizations and adaptations at the granularity of operators and kernels, ensuring every facet contributing to a DNN model's runtime efficiency is easily accessible to mobile developers via well-defined APIs. With nnPerf, the mobile developers can easily identify the bottleneck in model run-time efficiency and optimize the model architecture to meet system-level objectives (SLO). For more design details, please refer to our Sensys 2023 paper.

  • Plug-and-play design principles
  • Real-time on-device profiling
  • Support measuring fine-grained information at the GPU kernel level

To Install / Run profile

Quick start with apk

  1. Use adb to connect to smartphones or mobile platforms (Android basic system).

  2. Install the nnPerf_v1.1.apk.

    adb install -t '.\nnPerfAPKinstaller\nnPerf_v1.0.apk'

Build project

  1. Install Android Studio 3.6.3 (Runtime version: 1.8.0_212-release-1586-b04 amd64)

  2. Import Project

    File -> Open -> Current file directory

  3. Android Studio Setting

	Android Gradle Plugin Version: 3.1.3

	Gradle Version:                4.4

	NDK Version:                   21.0.6113669

	JDK Verison:                   1.8.0_211

	Complile Sdk Version:          27

	Build Tools Version:           27.0.3
  1. Run to profile
	Update Output path: /data/data/com.example.android.nnPerf/
  1. Note: In the case of GPU reasoning, do not directly switch models.

  2. Model support list (Support for adding other .tflite models)

	mobilenetV3-Large-Float

	mobilenetV3-Small-Float

	mobilenetV2-Float

	mobilenetV1-Float

	Squeezenet-Float

	EfficientNet-b0-Float

	MNasNet-1.0

	Densenet-Float

	mobilenetV1-Quant

	MobileBert

	SSDMobileV2

	Esrgan

Citation

If you find nnPerf useful in your research, please consider citing:

@inproceedings{chu2023nnperf,
    title={nnPerf: Demystifying DNN Runtime Inference Latency on Mobile Platforms},
    author={Haolin Chu, Xiaolong Zheng, Liang Liu, Huadong Ma},
    booktitle={The 21th ACM Conference on Embedded Networked Sensor Systems},
    pages={TBD},
    year={2023}
}

About


Languages

Language:Java 99.8%Language:Starlark 0.2%