Home - YingkunZhou/EdgeTransformerBench GitHub Wiki

Welcome to the EdgeTransformerPerf wiki!

ALL type of OS

please use pip intall gdown. Otherwise, you would need to download pretaineed models weights which mentioned in README.md one by one and struggle to convert models by yourself.

Linux/Ubuntu prerequisite

wget http://ports.ubuntu.com/pool/main/g/gcc-10/libstdc++6_10.5.0-1ubuntu1\~20.04_arm64.deb
sudo dpkg -i libstdc++6_10.5.0-1ubuntu1~20.04_arm64.deb

If use pre-built libraries, G++ GNU toolchains is enough to compile the C++ API based testsuite binaries

sudo apt install build-essential

we use clang-16 as default compiler toolchain to build DNN frameworks shared library, like NCNN, MNN, etc.

/etc/apt/sources.list
deb http://apt.llvm.org/focal/ llvm-toolchain-focal main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal main
# 16
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main
# 17
deb http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main
deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main
sudo -E apt update
LLVM_VERSION=16
sudo -E apt install libclang-${LLVM_VERSION}-dev clang-${LLVM_VERSION} llvm-${LLVM_VERSION} libclang-cpp${LLVM_VERSION}-dev libclang-cpp${LLVM_VERSION} llvm-${LLVM_VERSION}-dev libomp-${LLVM_VERSION}-dev 
export CC=/usr/bin/clang-16
export CXX=/usr/bin/clang++-16

However, the default compiler to build our benchmark test suite has no limitation, which can be GCC or clang, and any version you like, because we only care about and try to keep the performance reproducibility of DNN frameworks shared library.

  • opencl
sudo apt install ocl-icd-dev ocl-icd-libopencl1 ocl-icd-opencl-dev opencl-c-headers opencl-clhpp-headers opencl-headers
  • vulkan
sudo apt install mesa-vulkan-drivers libvulkan-dev
  • opencv
sudo apt install libopencv-dev
  • openmp
sudo apt install libomp-dev
  • python (also for MacOS and Windows)
pip install -r requirement.txt
  • tensorflow lite gpu delegation
sudo apt install libgles2-mesa-dev libegl1-mesa-dev xorg-dev

if you have no GPU, comment https://github.com/YingkunZhou/EdgeTransformerBench/blob/main/Makefile#L133 ~L136

Android prerequisite

First install termux app in android devices.

  • compiler

Use ANDROID_NDK to cross compile DNN frameworks shared library. In order to keep performance reproducibility, please use android-ndk-r22b version.

https://github.com/android/ndk/wiki/Unsupported-Downloads

export ANDROID_NDK=<path>/android-ndk-r22b

the compiler to build test suite, use the clang/GCC which Termux will provide.

The package which you will need in Termux as following, including compiler toolchain, opencv, opencl, vulkan related packages

pkg install root-repo x11-repo
pkg update
pkg install openssh git opencv \
  make pkg-config clang \
  clinfo opencl-vendor-driver clpeak \
  vulkan-tools vulkan-headers

MacOS prerequisite

First install apple xcode sdk commandline tools

xcode -select --install
pip install coremltools

Nvidia Jetson prerequisite

First install JetPack SDK >= 5.1, the Tensorrt environment is already settled.

Huawei Orange Pi AIPro prerequisite

First Install the official ubuntu mirror, then CANN acl environment is already settled.

Intel OpenVINO prerequisite

First refer to the OpenVINO installation webpage

GPU and NPU are required additional environment configurations. Please refer to https://docs.openvino.ai/2024/get-started/configurations.html for more details.

⚠️ **GitHub.com Fallback** ⚠️