Coder Social home page Coder Social logo

kanehui / nnlib Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 5.94 MB

cloned from https://source.codeaurora.org/quic/hexagon_nn/nnlib/

License: BSD 3-Clause Clear License

Makefile 0.36% C 76.02% Assembly 22.44% C++ 0.64% Objective-C 0.39% Python 0.13% Shell 0.02% Perl 0.01%
hexagon dsp hvx

nnlib's Introduction

Hexagon NN build instructions

Note that in order to run code on target, you have to follow the SDK instructions for installing a testsig.  
Try the "calculator" or other examples in the SDK to make sure you can execute on the DSP.

1) Source the Hexagon SDK setup_sdk_env.sh script.

2) Build the Hexagon NN dynamic library

  Note: For Hexagon SDK 3.4.0 and 3.4.1, please use toolv82 instead of toolv83 in all build instructions below.

  For SD820: make tree VERBOSE=1 V=hexagon_Release_dynamic_toolv83_v60
  For SD660: make tree VERBOSE=1 V=hexagon_Release_dynamic_toolv83_v60
  For SD835: make tree VERBOSE=1 V=hexagon_Release_dynamic_toolv83_v60
  For SD845: (best performance): make tree VERBOSE=1 V=hexagon_Release_dynamic_toolv83_v65 V65=1
  For SD845: (Don't use V65 code): make tree VERBOSE=1 V=hexagon_Release_dynamic_toolv83_v65
  For SD670: (best performance): make tree VERBOSE=1 V=hexagon_Release_dynamic_toolv83_v65 V65=1
  For SD670: (Don't use V65 code): make tree VERBOSE=1 V=hexagon_Release_dynamic_toolv83_v65
  For SD855: make tree VERBOSE=1 V=hexagon_Release_dynamic_toolv83_v66 V66=1
  For SD855: (Don't use V66 code): make tree VERBOSE=1 V=hexagon_Release_dynamic_toolv83_v66

3) Build the Hexagon NN test app

  By default, the test app will use the ADSP to run the graph.  If your target only supports HVX on the CDSP you will
  want to specify CDSP_FLAG to run the graph on the CDSP instead.  Examples of build commands:

  ADSP: make tree VERBOSE=1 V=android_Release
  ADSP: make tree VERBOSE=1 V=android_Release_aarch64
  CDSP: make tree VERBOSE=1 V=android_Release CDSP_FLAG=1
  CDSP: make tree VERBOSE=1 V=android_Release_aarch64 CDSP_FLAG=1

4) adb root ; adb remount

5) adb push android_Release/ship/graph_app /data
   or
   adb push android_Release_aarch64/ship/graph_app /data

6) adb push hexagon_Release_dynamic_toolv83_v60/ship/libhexagon_nn_skel.so /system/vendor/lib/rfsa/adsp/
	 (Replace with the actual V= path that gets created from the appropriate option from above)

7) adb shell /data/graph_app --help for info

Example command line:
   adb shell /data/graph_app --height 299 --width 299 --depth 3 --elementsize 4 --perfdump 1 /data/keyboard_299.dat 

nnlib's People

Stargazers

Reed Cioppa avatar

Watchers

Kane avatar

Forkers

ljfbleach

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.