- Notifications
You must be signed in to change notification settings - Fork126
Coral issue tracker (and legacy Edge TPU API source)
License
google-coral/edgetpu
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Thisedgetpu
repo is primarily our issue tracker for all types of bugsor feature requests with Coral devices and software.
If you have an issue,please report it here.
The code that remains in this repo is legacy and might be removed in the future.
The following build information is still accurate for the code in this repo,but beware that all the code in here is no longer maintained.
You should instead refer to the following repos:
- https://github.com/google-coral/libedgetpu: The Edge TPU Runtime (libedgetpu)
- https://github.com/google-coral/libcoral: The Coral C++ library (libcoral)
- https://github.com/google-coral/pycoral: The Coral Python library (PyCoral)
- https://github.com/google-coral/test_data: Various models and other testing data
Runscripts/runtime/install.sh
to install Edge TPU runtime orscripts/runtime/uninstall.sh
to uninstall it.
Run
scripts/build_swig.sh
to build SWIG-based native layer for differentLinux architectures. Build is Docker-based, so you need to have it installed.Run
make wheel
to generate Python library wheel and thenpip3 install $(ls dist/*.whl)
to install it
All native code is insidesrc
folder. You can build everything usingmake
command which invokesBazel internally.
For example, runmake tests
to build all C++ unit tests ormake benchmarks
to build all C++ benchmarks. To get the list of all available make targets runmake help
. All output goes toout
directory.
On Linux you can compile natively or cross-compile for 32-bit and 64-bit ARMCPUs.
To compile natively you need to install at least the following packages:
sudo apt-get install -y build-essential \ libpython3-dev \ libusb-1.0-0-dev \
and to cross-compile:
sudo dpkg --add-architecture armhfsudo apt-get install -y crossbuild-essential-armhf \ libpython3-dev:armhf \ libusb-1.0-0-dev:armhfsudo dpkg --add-architecture arm64sudo apt-get install -y crossbuild-essential-arm64 \ libpython3-dev:arm64 \ libusb-1.0-0-dev:arm64
Compilation or cross-compilation is done by setting CPU variable formake
command:
make CPU=k8 tests # Builds for x86_64 (default CPU value)make CPU=armv7a tests # Builds for ARMv7-A, e.g. Pi 3 or Pi 4make CPU=aarch64 tests # Builds for ARMv8, e.g. Coral Dev Board
You need to install the following software:
- Xcode fromhttps://developer.apple.com/xcode/
- Xcode Command Line Tools:
xcode-select --install
- Bazel for macOS fromhttps://github.com/bazelbuild/bazel/releases
- MacPorts fromhttps://www.macports.org/install.php
- Ports of
python
interpreter andnumpy
library:sudo port install python35 python36 python37 py35-numpy py36-numpy py37-numpy
- Port of
libusb
library:sudo port install libusb
Right after that all normalmake
commands should work as usual. You can runmake tests
to compile all C++ unit tests natively on macOS.
Docker allows to avoid complicated environment setup and build binaries forLinux on other operating systems without complicated setup:
make DOCKER_IMAGE=debian:buster DOCKER_CPUS="k8 armv7a aarch64" DOCKER_TARGETS=tests docker-buildmake DOCKER_IMAGE=ubuntu:18.04 DOCKER_CPUS="k8 armv7a aarch64" DOCKER_TARGETS=tests docker-build
About
Coral issue tracker (and legacy Edge TPU API source)