- VPUX NN Compiler
- VPUX Plugin
- VPUAL Backend
- Zero Backend
- HDDL2 Backend
- Software Kernels Implementation
-
Doxygen
sudo apt install doxygen
-
OpenJDK (for plantuml diagrams)
sudo apt install default-jdk
VPUX Plugin has automatically generated documentation describing the plugin design and API used for implementing it. Documentation can be built by the following commands
cmake -DENABLE_DOCS=ON ..
make vpux_plugin_docs
Execute the following to open documentation
chromium-browser ./docs/VPUX_DG/generated/html/index.html # chromium users
firefox ./docs/VPUX_DG/generated/html/index.html # firefox users
The following projects are used and must be cloned including git submodules update:
The following environment variables should be set:
- The
OPENVINO_HOME
environment variable to the OpenVINO Project cloned directory. - The
KMB_PLUGIN_HOME
environment variable to the KMB Plugin Project cloned directory.
The testing command assumes that the KMB board was setup and is available via ssh.
The following environment variables should be set:
- The
KMB_BOARD_HOST
environment variable to the hostname or ip address of the KMB board. - The
KMB_WORK_DIR
environment variable to the working directory on the KMB board.
- How to deploy VPUX Plugin build to KMB board
- How to run tests on KMB board
- How to set devices and platforms
Bypass related preparations
- Install the proper version of ClangFormat tool:
- In Linux:
$ sudo apt install -y clang-format-9
- If you use another OS, please update this document after you install the application
- In Linux:
- Set up the formatter tool in your IDE:
- For Visual Studio Code IDE, follow this manual.
- In Linux, the path to ClangFormat9 application is usually
/usr/bin/clang-format-9
You can check it with$ which clang-format-9
- In Linux, the path to ClangFormat9 application is usually
- If you use another IDE, please update this document after you set it up properly
- For Visual Studio Code IDE, follow this manual.
- If necessary, you can format the whole project at once:
- Set CMake option:
-D CLANG_FORMAT=path_to_your_clang_format_9
- Build target
clang_format_fix_all
- Set CMake option:
The VPUX plugin has extra CMake option to enable Developer build, which is orthogonal mode for Release/Debug configuration.
The mode is enabled with -D ENABLE_DEVELOPER_BUILD=ON
CMake option, which should be added to kmb-plugin CMake command line.
The mode enables extra debugging and logging functionality not available in default build:
- Pipeprint functionality on KMB board. It allows to get logs from VPU side on ARM.
Can be enabled with
IE_VPUX_ENABLE_PIPEPRINT=1
environment variable.
The following environment variables should be set:
- The
TOOLS_DIR
environment variable to the Movidius Tools directory. - The
VPUIP_HOME
environment variable to the [VPUIP_2 Project] cloned directory
-
Build firmware via
make_std_fw_image.py
with options:- CONFIG_USE_COMPONENT_PIPEPRINT='y'
- CONFIG_USE_SHAVE_PIPEPRINT='y'
-
rsync -avz $VPUIP_HOME/application/vpuFirmware/vpu_b0.bin root@$KMB_BOARD_HOST:/lib/firmware/vpu_custom.bin
-
Start server
cd $TOOLS_DIR/linux64/bin ./moviDebugServer --arm-reset=none
-
Start Movidius debug tool
cd $VPUIP_HOME/application/vpuFirmware/FW_bootLoader make debugi
-
Run the app on the device, the logs will be displayed via moviDebug2
To enable insertion of additional timer DMAs in the network:
- Compile and run inference using benchmark_app with additional flag "-pc" (For using existing blob see 2.)
- To compile blob (using compile_tool) with profiling enabled:
a) Enable it in the compiler config file(
*.json
): look for "PerformanceCounting" in "GlobalConfigParams" b) Add "PERF_COUNT YES" to compiler config file (-c option in compile_tool) - To parse profiling data manually you can use prof_parser. Run prof_parser -h to get info about its usage.
To update generated C++ headers for graph schema add the following parameter to kmb-plugin CMake configure command: -D MCM_GRAPH_SCHEMA_TAG=<tag or branch name>
, where <tag or branch name>
should be an existing tag or branch in graphFile-schema
repository.
It will add graph schema update target to the common build. The C++ headers for graph schema will be updated during the build.
Note: The generated headers are stored in the KMB Plugin Project repository and must be committed if there are changes. This is done to simplify cross-compilation build and build without access to graphFile-schema
repository.
To port changes from mcmCompiler
GitHub repository to kmb-plugin run the following commands:
export MCM_PATCH_FILE=~/mcm.patch
cd $MCM_COMPILER_HOME
git diff [first commit]..[last commit] > $MCM_PATCH_FILE
cd $KMB_PLUGIN_HOME
git apply --directory=src/mcmCompiler/ --reject $MCM_PATCH_FILE
Where [first commit]..[last commit]
- commit range to transfer. For example, [first commit]
is previous merge commit, [last commit]
- current merge commit for PR.
The above commands will transfer code difference to kmb-plugin repository. Separate commit still should be created.
git diff
/ git apply
can be replaced with git format-patch
/ git am
to transfer separate commits with their messages and other properties. See git documentation for details.
export KMB_PLUGIN_HOME=<path to kmb-plugin>
export VPUAL_HOME=<path to vpualHost>
rm -rf $KMB_PLUGIN_HOME/artifacts/vpualHostInstallPackage/*
cp -r $VPUAL_HOME/install/* $KMB_PLUGIN_HOME/artifacts/vpualHostInstallPackage/
git checkout -b <name_of_new_branch>
git add -A
git commit -m "integrate new version vpualHost"
The VPUX plugins uses G-API based preprocessing located in G-API-VPU project.
For any questions regarding this component please refer to G-API-VPU project maintainers.