This guide gives instructions on how to build and test TEngine on your system.
To get started, clone the latest TEngine repository.
cd ~/tengine
cp makefile.config.example makefile.config
cp etc/config.example etc/config
By default, CONFIG_ARCH_ARM64
option is valid, and CONFIG_CAFFE_REF
, CAFFE_ROOT
, CONFIG_EVENT_EXECUTOR
are commented in makefile.config
. If your target is arm arch, and you don't want to use caffe's operators and event executor, you can directly build TEngine by make
without doing any change to makefile.config
. Otherwise, please edit makefile.config
according to your specific requirements.
In order to load caffe model directly, protobuf library has to been installed.
While Opencv library is required for sample applications to process images
sudo apt install libprotobuf-dev
sudo apt install libopencv-dev
If you want to use caffe's operators in TEngine, to verify the operator developped on TEngine, please build Caffe or CaffeOnACL in advance and set the path of caffe to CAFFE_ROOT
in makefile.config
.
For example:
CONFIG_CAFFE_REF=y
CAFFE_ROOT = /home/firefly/caffe
cd ~/tengine
make
make test (Optional)
make test
is executed when you need to build and run some additional test programs in the project.
TEngine also provides some example programs for tests, and you can easily validate whether your TEngine is successfully built by running these test programs and inspecting the results.
cd ~/tengine
./build/tests/bin/test_sqz
Output message:
0.2763 - "n02123045 tabby, tabby cat"
0.2673 - "n02123159 tiger cat"
0.1766 - "n02119789 kit fox, Vulpes macrotis"
0.0827 - "n02124075 Egyptian cat"
0.0777 - "n02085620 Chihuahua"
cd ~/tengine
./build/tests/bin/test_mobilenet
Output message:
8.5976 - "n02123159 tiger cat"
7.9550 - "n02119022 red fox, Vulpes vulpes"
7.8679 - "n02119789 kit fox, Vulpes macrotis"
7.4274 - "n02113023 Pembroke, Pembroke Welsh corgi"
6.3647 - "n02123045 tabby, tabby cat"
For more information about the performance test of TEngine, please refer to the documentation of benchmark.