From: Wook Song Date: Wed, 10 Jun 2020 00:29:09 +0000 (+0900) Subject: [Dist/Debian] Import files needed to debianize from the upstream X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0a584f95cc39e9844571444e30e9295118c2da2;p=platform%2Fadaptation%2Fnpu%2Fgoogle-edgetpu-runtime.git [Dist/Debian] Import files needed to debianize from the upstream This patch imports files needed to debianize libedgetpu* and edgetpu-compiler from the upstream. Note that debian/rules is slightly modified to exclude the other packages. Signed-off-by: Wook Song --- diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..7bed155 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,163 @@ +edgetpu (12.1-1) mendel-chef; urgency=medium + + * Avoid copying of input tensors. + * Support Gst.Buffer and bytes objects in run_inference to avoid copies + * Fixes to error handling + + -- Coral Wed, 30 Oct 2019 15:58:16 -0700 + +edgetpu (12-1) mendel-chef; urgency=medium + + * Use new Bazel-based toolchain to cross-compile with GCC + * Python 3.5, 3.6, 3.7 support for armhf, aarch64, and x86_64 + * Add C API support for Edge TPU library + * Package Edge TPU runtime in a separate tar file + + -- Coral Mon, 16 Sep 2019 13:27:18 -0700 + +edgetpu (11-1) mendel-chef; urgency=medium + + * Update EdgeTpu runtime to version 12 + * Update C++ wrappers based on refactored architecture + * Add Edge TPU binary compiler + + Function: + * Add SoftmaxRegression class for on-device training with back propagation + * Re-implement ImprintingEngine using L2-normalization, with improved + performance and ability to keep pre-trained classes (requires a different + base model architecture) + * Add RunInference to ImprintingEngine API + + Bug: + * Fix bug of gray image in transfer learning demo + * Use at least 1 image for training set + * Modify demos to support reading labels without label id + * Fix bug for disorder of height and width + * Allow user to specify output folder for downloaded images + + Doc: + * Add more comments on 'keep_aspect_ratio' + * Clean up Edge TPU names + * Add build/install instructions to README + * Add notice to ImprintingEngine to explain the API diffs + + -- Coral Mon, 15 Jul 2019 15:52:14 -0700 + +edgetpu (10-2) mendel-chef; urgency=medium + + * Bump version for point release + + -- Coral Thu, 18 Apr 2019 13:37:19 -0700 + +edgetpu (9-2) mendel-chef; urgency=medium + + * Add flag '--enable_assertion' to enable assertion in benchmark tests + * Properly test installed edgetpu library (-i option) + * Use public names + * Use USB accelerator instead of internal name + * Add uninstall.sh script + * Improve edgetpu python versioning style + + -- Coral Wed, 03 Apr 2019 14:11:47 -0800 + +edgetpu (8-2) mendel-chef; urgency=medium + + * Update libraries + * Update install.sh to install to /usr/lib instead of /lib + * Add exception tests for multiple TPUs + + -- Coral Tue, 02 Apr 2019 14:11:47 -0800 + +edgetpu (7-2) mendel-chef; urgency=medium + + * Update libedgetpu with soname. + * Store exception related tests into exception_test.py and disable it on + Raspberry Pi. + * Include demo files in distribution + * Rename EdgeTpuState_kXXX to EDGE_TPU_STATE_XXX + * remove test_data dependency from imprinting demo + * Update ListEdgeTpuPaths comment + * Better recognize devboard by checking existence of mendel_version + file. + * Proper symlinks for shared libraries. + * Update edgetpu runtime with throttling turned off for PCI-e + * Bump changelog and version for Chef release #2. + + -- Coral Thu, 28 Mar 2019 14:11:47 -0800 + +edgetpu (6-2) mendel-chef; urgency=medium + + * Add script to analyze Multiple Edge TPU performance on Python side. + * Add missing python3-tk package. + * Change matplotlib backend instead of configuring tk. + * Update libedgetpu.so + * Getting rid of colors.sh. + * Install throttled libedgetpu.so on Dev Board by default. + * Add python 3.6 support. + * Test data is not included in the runtime distribution. + * Use wheel instead of plain python files for installation. + * Updates edgetpu_cpp_wrapper and adds tests for exception handling. + * Rename AIY to Coral. + * Add multiple Edge TPU demo. + * Update multiple_tpus_performance_analysis.py + * Simplifies benchmark set. + * Separate deb packages for std and max libedgetpu runtime. + * Proper deb package generation for py35 and py36 wrappers. + * Adds version check function and constants into Python API. + + -- Coral Tue, 19 Mar 2019 17:08:25 -0700 + +edgetpu (5-2) mendel-beaker; urgency=medium + + * Update libedgetpu binaries + + -- Coral Fri, 08 Mar 2019 14:11:47 -0800 + +edgetpu (4-2) mendel-beaker; urgency=medium + + * Use different working directory for unittests. + * Update bazel invocation and io_bazel_rules_closure + * Skip bad image when loading test dataset. + * Fix coco eval test on gLinux + * Copying .py files is not needed anymore in qa_test.sh. + * Reduce test_utils redundancy. + * Disable coco test temporarily + * Move benchmark code into /benchmarks dir. + * Move all unit tests to /tests folder. + * beef up edgetpu/classification/engine_test.py + * Update package list for Dev Board running Python API tests. + * Slightly lower test tolerances. + * Update QA test script to test default frequency. + * Add auto-confirm for test automation. + + -- Coral Wed, 27 Feb 2019 11:00:25 -0800 + +edgetpu (3-2) mendel-beaker; urgency=medium + + * Add LICENSE to package. + + -- Coral Mon, 04 Feb 2019 11:20:13 -0800 + +edgetpu (3-1) mendel-beaker; urgency=medium + + * Replace SeeFood with iNat bird model + + -- Coral Mon, 28 Jan 2019 14:10:00 -0800 + +edgetpu (2-1) mendel-beaker; urgency=medium + + * Update libedgetpu binaries + + -- Coral Tue, 22 Jan 2019 10:42:07 -0800 + +edgetpu (1-1) mendel-beaker; urgency=medium + + * Cut for beaker release and normalization of version. + + -- Coral Wed, 16 Jan 2019 12:00:00 -0800 + +edgetpu (0.1) UNRELEASED; urgency=medium + + * Initial release. + + -- Coral Mon, 04 Jun 2018 16:14:00 -0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..7f4d4a0 --- /dev/null +++ b/debian/control @@ -0,0 +1,64 @@ +Source: edgetpu +Maintainer: Coral +Section: python +Priority: optional +Build-Depends: dh-python, python3-setuptools, python3-all, debhelper (>= 9) +Standards-Version: 3.9.6 +Homepage: https://coral.withgoogle.com/ + +Package: libedgetpu1-std +Provides: libedgetpu1 +Conflicts: libedgetpu1 +Section: misc +Priority: optional +Architecture: any +Multi-Arch: same +Depends: libc6, + libgcc1, + libstdc++6, + libusb-1.0-0, + ${misc:Depends} +Description: Support library for Edge TPU + Support library (standard speed) for the Edge TPU + +Package: libedgetpu1-max +Provides: libedgetpu1 +Conflicts: libedgetpu1 +Section: misc +Priority: optional +Architecture: any +Multi-Arch: same +Depends: libc6, + libgcc1, + libstdc++6, + libusb-1.0-0, + ${misc:Depends} +Description: Support library for Edge TPU + Support library (max speed) for the Edge TPU + +Package:libedgetpu-dev +Section: libdevel +Priority: optional +Architecture: any +Depends: libedgetpu1, + ${misc:Depends} +Description: Development files for libedgetpu + This package contains C++ Header files for libedgetpu.so + +Package:edgetpu-compiler +Section: misc +Priority: optional +Architecture: arm64 amd64 +Depends: ${misc:Depends} +Description: Edge TPU model compiler + This package contains the Edge TPU model compiler + +Package:edgetpu +Section: metapackages +Priority: optional +Architecture: all +Depends: edgetpu-compiler, + libedgetpu1-std | libedgetpu1-max, + ${misc:Depends} +Description: Edge TPU compiler and runtime + Installs core components for Edge TPU support. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..8d6cf4e --- /dev/null +++ b/debian/copyright @@ -0,0 +1,7 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: edgetpu-api +Source: https://coral.googlesource.com/edgetpu-api + +Files: * +Copyright: Copyright 2018 Google, LLC +License: Apache-2.0 diff --git a/debian/edgetpu-compiler.lintian-overrides b/debian/edgetpu-compiler.lintian-overrides new file mode 100644 index 0000000..6c6228c --- /dev/null +++ b/debian/edgetpu-compiler.lintian-overrides @@ -0,0 +1,8 @@ +# We bundle a newer version of GLIBC whose ld.so must be +x. +# ldconfig triggers but can't do anything. +edgetpu-compiler: shared-lib-without-dependency-information +edgetpu-compiler: binary-or-shlib-defines-rpath +edgetpu-compiler: embedded-library +edgetpu-compiler: subdir-in-usr-bin +edgetpu-compiler: shlib-with-executable-bit +edgetpu-compiler: package-has-unnecessary-activation-of-ldconfig-trigger diff --git a/debian/libedgetpu-dev.install b/debian/libedgetpu-dev.install new file mode 100644 index 0000000..c53db48 --- /dev/null +++ b/debian/libedgetpu-dev.install @@ -0,0 +1,2 @@ +libedgetpu/edgetpu.h /usr/include +libedgetpu/edgetpu_c.h /usr/include diff --git a/debian/libedgetpu1-max.lintian-overrides b/debian/libedgetpu1-max.lintian-overrides new file mode 100644 index 0000000..3591ed2 --- /dev/null +++ b/debian/libedgetpu1-max.lintian-overrides @@ -0,0 +1,4 @@ +# We provide two conflicting package variants with the same soname inside. +libedgetpu1-max: package-name-doesnt-match-sonames libedgetpu1 +libedgetpu1-max: missing-debconf-dependency-for-preinst +libedgetpu1-max: too-long-short-description-in-templates libedgetpu/accepted-eula diff --git a/debian/libedgetpu1-max.preinst b/debian/libedgetpu1-max.preinst new file mode 100644 index 0000000..5a7a763 --- /dev/null +++ b/debian/libedgetpu1-max.preinst @@ -0,0 +1,24 @@ +#!/bin/sh -e + +. /usr/share/debconf/confmodule + +db_version 2.0 + +db_get libedgetpu/accepted-eula +if [ "$RET" = "true" ]; then + exit 0 # already accepted +fi + +db_fset libedgetpu/accepted-eula seen false +db_input critical libedgetpu/accepted-eula +db_go || true + +db_get libedgetpu/accepted-eula +if [ "$RET" = "true" ]; then + exit 0 # accepted +fi + +db_input critical libedgetpu/error-eula +db_go || true + +exit 1 # not accepted diff --git a/debian/libedgetpu1-max.templates b/debian/libedgetpu1-max.templates new file mode 100644 index 0000000..8255453 --- /dev/null +++ b/debian/libedgetpu1-max.templates @@ -0,0 +1,21 @@ +Template: libedgetpu/accepted-eula +Type: boolean +Default: false +Description: Continue to install the Edge TPU runtime that runs at the maximum operating frequency? + You're about to install the Edge TPU runtime that runs at the maximum operating frequency. + . + Warning: During normal operation, the USB Accelerator may heat up, depending + on the computation workloads and operating frequency. Touching the metal part of the + device after it has been operating for an extended period of time may lead to discomfort + and/or skin burns. As such, when using the Edge TPU runtime at the maximum operating + frequency, the USB Accelerator should be operated at an ambient temperature of 25C or less. + (If you instead use the Edge TPU runtime at the default operating frequency, then the device + is safe to operate at an ambient temperature of 35C or less.) + . + Google does not accept any responsibility for any loss or damage if the device is operated + outside of the recommended ambient temperature range. + +Template: libedgetpu/error-eula +Type: error +Description: Install aborted. + For help setting up your device, see g.co/coral/setup. diff --git a/debian/libedgetpu1-max.triggers b/debian/libedgetpu1-max.triggers new file mode 100644 index 0000000..dd86603 --- /dev/null +++ b/debian/libedgetpu1-max.triggers @@ -0,0 +1 @@ +activate-noawait ldconfig diff --git a/debian/libedgetpu1-max.udev b/debian/libedgetpu1-max.udev new file mode 120000 index 0000000..f096868 --- /dev/null +++ b/debian/libedgetpu1-max.udev @@ -0,0 +1 @@ +../libedgetpu/edgetpu-accelerator.rules \ No newline at end of file diff --git a/debian/libedgetpu1-std.lintian-overrides b/debian/libedgetpu1-std.lintian-overrides new file mode 100644 index 0000000..cfa2624 --- /dev/null +++ b/debian/libedgetpu1-std.lintian-overrides @@ -0,0 +1,2 @@ +# We provide two conflicting package variants with the same soname inside. +libedgetpu1-std: package-name-doesnt-match-sonames libedgetpu1 diff --git a/debian/libedgetpu1-std.triggers b/debian/libedgetpu1-std.triggers new file mode 100644 index 0000000..dd86603 --- /dev/null +++ b/debian/libedgetpu1-std.triggers @@ -0,0 +1 @@ +activate-noawait ldconfig diff --git a/debian/libedgetpu1-std.udev b/debian/libedgetpu1-std.udev new file mode 120000 index 0000000..f096868 --- /dev/null +++ b/debian/libedgetpu1-std.udev @@ -0,0 +1 @@ +../libedgetpu/edgetpu-accelerator.rules \ No newline at end of file diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..17de90d --- /dev/null +++ b/debian/rules @@ -0,0 +1,45 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +# export DH_VERBOSE=1 + +FILENAME := libedgetpu.so.1.0 +SONAME := libedgetpu.so.1 +LIB_DEV := debian/libedgetpu-dev/usr/lib/$(DEB_HOST_GNU_TYPE) +LIB_STD := debian/libedgetpu1-std/usr/lib/$(DEB_HOST_GNU_TYPE) +LIB_MAX := debian/libedgetpu1-max/usr/lib/$(DEB_HOST_GNU_TYPE) +COMPILER_BIN := debian/edgetpu-compiler/usr/bin +ifeq ($(DEB_TARGET_ARCH),armhf) + CPU := armv7a + else ifeq ($(DEB_TARGET_ARCH),arm64) + COMPILER_ARCH := aarch64 + CPU := aarch64 + else ifeq ($(DEB_TARGET_ARCH),amd64) + COMPILER_ARCH := x86_64 + CPU := k8 + endif + +%: + dh $@ --parallel + +override_dh_auto_install: + dh_auto_install + + mkdir -p $(LIB_DEV) + ln -fs $(FILENAME) $(LIB_DEV)/libedgetpu.so + + mkdir -p $(LIB_STD) + cp -f libedgetpu/throttled/$(CPU)/$(FILENAME) $(LIB_STD)/$(FILENAME) + ln -fs $(FILENAME) $(LIB_STD)/$(SONAME) + + mkdir -p $(LIB_MAX) + cp -f libedgetpu/direct/$(CPU)/$(FILENAME) $(LIB_MAX)/$(FILENAME) + ln -fs $(FILENAME) $(LIB_MAX)/$(SONAME) + + mkdir -p $(COMPILER_BIN) + cp -fr compiler/$(COMPILER_ARCH)/* $(COMPILER_BIN) + +# Skip .so post processing. +override_dh_strip: +override_dh_shlibdeps: