Merge branch 'dey-4.0/maint' into dey-4.0/master
This merges back release 'dey-4.0-r7.2' + a few more fixes after the tag. Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
commit
bdbe657578
|
|
@ -31,6 +31,7 @@ KERNEL_DEVICETREE ?= " \
|
|||
digi/_ov_som_bt-dtm_ccimx9.dtbo \
|
||||
digi/_ov_som_emulate-ccimx91_ccimx93.dtbo \
|
||||
digi/_ov_som_npu_ccimx93.dtbo \
|
||||
digi/_ov_som_single-core-512M_ccimx93.dtbo \
|
||||
digi/_ov_som_wifi_ccimx9.dtbo \
|
||||
${@bb.utils.contains('DISTRO_FEATURES', 'tsn', 'digi/_ov_board_eqos-tsn_ccimx9-dvk.dtbo', '', d)} \
|
||||
"
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ STM32MP_KERNEL_DEVICETREE:ccmp25-dvk += " \
|
|||
ccmp25-dvk.dtb \
|
||||
_ov_board_e55rb-i-mw346-c-mipi-dsi_ccmp25-dvk.dtbo \
|
||||
_ov_board_g101evn010-lvds_ccmp25-dvk.dtbo \
|
||||
_ov_board_imx335-mipi-csi_ccmp25-dvk.dtbo \
|
||||
_ov_board_mikroe-accel2-click_ccmp25-dvk.dtbo \
|
||||
_ov_board_mikroe-gyro-click_ccmp25-dvk.dtbo \
|
||||
_ov_board_mikroe-i2c-to-spi-click_ccmp25-dvk.dtbo \
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ BT_TTY ?= "ttyLP0"
|
|||
|
||||
# Per-machine DISTRO_FEATURES customization
|
||||
MACHINE_DISTRO_FEATURES_REMOVE = "vulkan"
|
||||
MACHINE_DISTRO_FEATURES_REMOVE:ccimx91 = "gstreamer opengl vulkan wayland x11"
|
||||
|
||||
# SWUpdate sw-description configuration
|
||||
BOOTFS_EXT ?= ".boot.vfat"
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ EXTRA_OEMAKE += "LDFLAGS="
|
|||
# Set external-dt support
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('EXTERNAL_DT_ENABLED', '1', 'CFG_EXT_DTS=${STAGING_EXTDT_DIR}/optee', '', d)}"
|
||||
# Set scp-firmware support
|
||||
EXTRA_OEMAKE += "CFG_SCP_FIRMWARE=${STAGING_SCPFW_DIR}"
|
||||
EXTRA_OEMAKE += "CFG_SCP_FIRMWARE=${STAGING_SCPFW_DIR} CFG_SCPFW_LOG_LEVEL=5 CFG_WERROR=n"
|
||||
|
||||
# debug and trace
|
||||
EXTRA_OEMAKE += "${@bb.utils.contains('ST_OPTEE_DEBUG_TRACE', '1', 'CFG_TEE_CORE_LOG_LEVEL=${ST_OPTEE_DEBUG_LOG_LEVEL} CFG_TEE_CORE_DEBUG=${ST_OPTEE_CORE_DEBUG}', '', d)}"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@ OPTEEOUTPUTMACHINE ?= "stm32mp1"
|
|||
OPTEEOUTPUTMACHINE:stm32mp1common = "stm32mp1"
|
||||
OPTEEOUTPUTMACHINE:stm32mp2common = "stm32mp2"
|
||||
|
||||
# Enable OPTEE_DEBUG_TRACE; If set to 0, LOG_LEVEL defaults to 3 on optee code
|
||||
ST_OPTEE_DEBUG_TRACE = "1"
|
||||
# Log level
|
||||
ST_OPTEE_DEBUG_LOG_LEVEL = "0"
|
||||
|
||||
# The package is empty but must be generated to avoid apt-get installation issue
|
||||
ALLOW_EMPTY:${PN} = "1"
|
||||
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ if test "${soc_type}" = "imx93"; then
|
|||
module_has_npu="0"
|
||||
setenv extra_bootargs ${extra_bootargs} mem=512M
|
||||
setenv overlays _ov_som_emulate-ccimx91_ccimx93.dtbo,${overlays}
|
||||
elif test "${module_variant}" = "0x03" || test "${module_variant}" = "0x04"; then
|
||||
setenv overlays _ov_som_single-core-512M_ccimx93.dtbo,${overlays}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ CONFIG_CGROUP_FREEZER=y
|
|||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_CGROUP_BPF=y
|
||||
CONFIG_CGROUP_NS=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_IP_NF_FILTER=m
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_NETFILTER=y
|
||||
CONFIG_BRIDGE_NETFILTER=m
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ require include/time64.inc
|
|||
YOCTO_MAJOR = "4"
|
||||
YOCTO_MINOR = "0"
|
||||
DEY_RELEASE = "7"
|
||||
DEY_BUILD = "1"
|
||||
DEY_BUILD = "2"
|
||||
|
||||
# Firmware version of the system.
|
||||
DEY_FIRMWARE_VERSION ?= "${YOCTO_MAJOR}.${YOCTO_MINOR}.${DEY_RELEASE}.${DEY_BUILD}"
|
||||
|
|
|
|||
|
|
@ -6,28 +6,28 @@ MODELS_DIR = "models"
|
|||
# Directory for transformation tasks.
|
||||
VELA_MODELS_DIR = "vela_models"
|
||||
|
||||
# The Vela native tool is required to transform the models.
|
||||
DEPENDS += "ethos-u-vela-native"
|
||||
|
||||
SRC_URI += " \
|
||||
file://patches/0001-Customize-EiQ-demos.patch \
|
||||
file://patches/0002-dms-update-the-demo-to-use-the-landmark-full-model.patch \
|
||||
file://patches/0003-download_models-update-the-download-location-of-some.patch \
|
||||
file://patches/0004-improvements-capture-x-windows-and-increase-resoluti.patch \
|
||||
file://scripts/launch_eiq_demo.sh \
|
||||
file://service/eiqdemo.service \
|
||||
"
|
||||
|
||||
inherit python3native systemd
|
||||
|
||||
# Custom task to download and transform the models using Vela.
|
||||
do_download_transform_models() {
|
||||
cd "${S}"
|
||||
python3 "${S}/download_models.py"
|
||||
${PYTHON} download_models.py
|
||||
}
|
||||
do_download_transform_models[depends] += " \
|
||||
ethos-u-vela-native:do_populate_sysroot \
|
||||
python3-requests-native:do_populate_sysroot \
|
||||
"
|
||||
do_download_transform_models[dirs] = "${S}"
|
||||
do_download_transform_models[network] = "1"
|
||||
|
||||
# Add the custom task to download and transform the models.
|
||||
addtask do_download_transform_models after do_patch before do_install
|
||||
|
||||
inherit systemd
|
||||
addtask download_transform_models after do_patch before do_install
|
||||
|
||||
do_install () {
|
||||
# Install scripts to /usr/bin.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,138 @@
|
|||
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||
Date: Wed, 2 Oct 2024 11:58:15 +0200
|
||||
Subject: [PATCH] improvements: capture "x" windows and increase resolution
|
||||
|
||||
When running in window mode (no fullscreen), stop the application.
|
||||
Increase the camera resolution to 1280x720.
|
||||
|
||||
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||
---
|
||||
dms/main.py | 13 +++++++++----
|
||||
face_recognition/main.py | 12 ++++++++----
|
||||
gesture_detection/main.py | 13 +++++++++----
|
||||
object_detection/main.py | 13 +++++++++----
|
||||
4 files changed, 35 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/dms/main.py b/dms/main.py
|
||||
index e74b6be1b938..99b501ca2194 100644
|
||||
--- a/dms/main.py
|
||||
+++ b/dms/main.py
|
||||
@@ -14,10 +14,10 @@ from eye_landmark import EyeMesher
|
||||
from face_landmark import FaceMesher
|
||||
from utils import *
|
||||
|
||||
-WIDTH=640
|
||||
-HEIGH=480
|
||||
-FLIP=None # None, skip, 0: Flip vertically, 1: Flip horizontally (around the y-axis), -1: Flip both vertically and horizontally
|
||||
-FORMAT=0 # None, skip (YUYV, default), 0 MJPG (for usb camera)
|
||||
+WIDTH=1280
|
||||
+HEIGH=720
|
||||
+FLIP=None # None, skip, 0: Flip vertically, 1: Flip horizontally (around the y-axis), -1: Flip both vertically and horizontally
|
||||
+FORMAT=None # None, skip (YUYV, default), 0 MJPG (for usb camera)
|
||||
|
||||
# Always enforce the Ethos NPU, use the converted vela models
|
||||
MODEL_PATH = pathlib.Path("../vela_models/")
|
||||
@@ -197,6 +197,11 @@ while ret:
|
||||
if FLIP is not None:
|
||||
image = cv2.flip(image, FLIP)
|
||||
if cv2.waitKey(1) & 0xFF == ord('q'):
|
||||
+ # "q" key pressed
|
||||
+ break
|
||||
+
|
||||
+ if cv2.getWindowProperty(window_name, cv2.WND_PROP_AUTOSIZE):
|
||||
+ # Window closed by click 'X'
|
||||
break
|
||||
except Exception as err:
|
||||
# Ignore exceptions
|
||||
diff --git a/face_recognition/main.py b/face_recognition/main.py
|
||||
index 33ffa7161fac..40ca9f8afb91 100644
|
||||
--- a/face_recognition/main.py
|
||||
+++ b/face_recognition/main.py
|
||||
@@ -13,10 +13,10 @@ from face_detection import YoloFace
|
||||
from face_recognition import Facenet
|
||||
from face_database import FaceDatabase
|
||||
|
||||
-WIDTH=640
|
||||
-HEIGH=480
|
||||
-FLIP=None # None, skip, 0: Flip vertically, 1: Flip horizontally (around the y-axis), -1: Flip both vertically and horizontally
|
||||
-FORMAT=0 # None, skip (YUYV, default), 0 MJPG (for usb camera)
|
||||
+WIDTH=1280
|
||||
+HEIGH=720
|
||||
+FLIP=None # None, skip, 0: Flip vertically, 1: Flip horizontally (around the y-axis), -1: Flip both vertically and horizontally
|
||||
+FORMAT=None # None, skip (YUYV, default), 0 MJPG (for usb camera)
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
@@ -144,6 +144,10 @@ while True:
|
||||
while cv2.waitKey(100) & 0xFF == 0xFF:
|
||||
pass
|
||||
|
||||
+ if cv2.getWindowProperty(window_name, cv2.WND_PROP_AUTOSIZE):
|
||||
+ # Window closed by click 'X'
|
||||
+ break
|
||||
+
|
||||
time.sleep(2)
|
||||
vid.release()
|
||||
cv2.destroyAllWindows()
|
||||
diff --git a/gesture_detection/main.py b/gesture_detection/main.py
|
||||
index 15b85976fd72..8ad2c9bd409b 100644
|
||||
--- a/gesture_detection/main.py
|
||||
+++ b/gesture_detection/main.py
|
||||
@@ -63,10 +63,10 @@ if args.input.isdigit():
|
||||
else:
|
||||
cap_input = args.input
|
||||
|
||||
-WIDTH=640
|
||||
-HEIGH=480
|
||||
-FLIP=None # None, skip, 0: Flip vertically, 1: Flip horizontally (around the y-axis), -1: Flip both vertically and horizontally
|
||||
-FORMAT=0 # None, skip (YUYV, default), 0 MJPG (for usb camera)
|
||||
+WIDTH=1280
|
||||
+HEIGH=720
|
||||
+FLIP=None # None, skip, 0: Flip vertically, 1: Flip horizontally (around the y-axis), -1: Flip both vertically and horizontally
|
||||
+FORMAT=None # None, skip (YUYV, default), 0 MJPG (for usb camera)
|
||||
|
||||
# This pipeline for the OV5640 camera in case the other command fails
|
||||
# capture = cv2.VideoCapture("v4l2src device=%s ! imxvideoconvert_pxp ! video/x-raw,format=RGB16,width=%d,height=%d " \
|
||||
@@ -100,6 +100,11 @@ while ret:
|
||||
|
||||
ret, frame = capture.read()
|
||||
if cv2.waitKey(1) & 0xFF == ord('q'):
|
||||
+ # "q" key pressed
|
||||
+ break
|
||||
+
|
||||
+ if cv2.getWindowProperty(window_name, cv2.WND_PROP_AUTOSIZE):
|
||||
+ # Window closed by click 'X'
|
||||
break
|
||||
|
||||
cv2.waitKey(2000)
|
||||
diff --git a/object_detection/main.py b/object_detection/main.py
|
||||
index efa614ebd44b..34ba17eddffb 100644
|
||||
--- a/object_detection/main.py
|
||||
+++ b/object_detection/main.py
|
||||
@@ -13,10 +13,10 @@ import argparse
|
||||
|
||||
from labels import label2string
|
||||
|
||||
-WIDTH=640
|
||||
-HEIGH=480
|
||||
-FLIP=None # None, skip, 0: Flip vertically, 1: Flip horizontally (around the y-axis), -1: Flip both vertically and horizontally
|
||||
-FORMAT=0 # None, skip (YUYV, default), 0 MJPG (for usb camera)
|
||||
+WIDTH=1280
|
||||
+HEIGH=720
|
||||
+FLIP=None # None, skip, 0: Flip vertically, 1: Flip horizontally (around the y-axis), -1: Flip both vertically and horizontally
|
||||
+FORMAT=None # None, skip (YUYV, default), 0 MJPG (for usb camera)
|
||||
|
||||
# Always enforce the Ethos NPU, use the converted vela models
|
||||
MODEL_PATH = "../vela_models/ssd_mobilenet_v1_quant_vela.tflite"
|
||||
@@ -122,6 +122,11 @@ while ret:
|
||||
if FLIP is not None:
|
||||
frame = cv2.flip(frame, FLIP)
|
||||
if cv2.waitKey(1) & 0xFF == ord('q'):
|
||||
+ # "q" key pressed
|
||||
+ break
|
||||
+
|
||||
+ if cv2.getWindowProperty(window_name, cv2.WND_PROP_AUTOSIZE):
|
||||
+ # Window closed by click 'X'
|
||||
break
|
||||
|
||||
cv2.waitKey(2000)
|
||||
|
|
@ -36,4 +36,4 @@ DEMO_DIR="/usr/bin/eiq-examples-git/${DEMO}"
|
|||
cd "${DEMO_DIR}" || exit
|
||||
|
||||
# Execute the demo pre-configuring the display settings.
|
||||
WAYLAND_DISPLAY=/run/wayland-0 DISPLAY=:0.0 XDG_RUNTIME_DIR=/run/user/0 python3 main.py -i /dev/video0 -f -d /usr/lib/libethosu_delegate.so &
|
||||
WAYLAND_DISPLAY=/run/wayland-0 DISPLAY=:0.0 XDG_RUNTIME_DIR=/run/user/0 python3 main.py -i /dev/video0 -f -d /usr/lib/libethosu_delegate.so
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
[Unit]
|
||||
Description=Initialization of EiQ DMS demo
|
||||
After=multi-user.target
|
||||
After=graphical.target
|
||||
ConditionPathExists=/dev/video0
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
Type=exec
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/etc/demos/scripts/launch_eiq_demo.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=graphical.target
|
||||
|
|
|
|||
|
|
@ -45,3 +45,6 @@ do_compile() {
|
|||
|
||||
setuptools3_do_compile
|
||||
}
|
||||
|
||||
# Require the external NPU delegate.
|
||||
RDEPENDS:${PN}:append:stm32mp25common = " tflite-vx-delegate "
|
||||
|
|
|
|||
|
|
@ -0,0 +1,111 @@
|
|||
commit 7ac938965051de91c493b75a8825b007e1f52599
|
||||
Author: Feiyue Chen <Feiyue.Chen@verisilicon.com>
|
||||
Date: Thu Jul 6 10:41:35 2023 +0000
|
||||
|
||||
Fixed bugs for kernel test building
|
||||
|
||||
diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt
|
||||
index 073b29c4860..67486fa183b 100644
|
||||
--- a/tensorflow/lite/CMakeLists.txt
|
||||
+++ b/tensorflow/lite/CMakeLists.txt
|
||||
@@ -209,6 +209,8 @@ list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*tflite_with_xnnpack\\.cc$")
|
||||
# Exclude Flex related files.
|
||||
list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*with_selected_ops\\.cc$")
|
||||
|
||||
+list(FILTER TFLITE_SRCS EXCLUDE REGEX "tensorflow_profiler_logger\\.cc$")
|
||||
+
|
||||
if(_TFLITE_ENABLE_MMAP)
|
||||
list(FILTER TFLITE_SRCS EXCLUDE REGEX ".*mmap_allocation_disabled\\.cc$")
|
||||
else()
|
||||
diff --git a/tensorflow/lite/kernels/CMakeLists.txt b/tensorflow/lite/kernels/CMakeLists.txt
|
||||
index f5e22ee97da..d0da2680e7b 100644
|
||||
--- a/tensorflow/lite/kernels/CMakeLists.txt
|
||||
+++ b/tensorflow/lite/kernels/CMakeLists.txt
|
||||
@@ -63,16 +63,16 @@ build_flatbuffers(
|
||||
set(DELEGATE_PROVIDERS_SUPP
|
||||
${TFLITE_SOURCE_DIR}/nnapi/sl/SupportLibrary.cc
|
||||
${TFLITE_SOURCE_DIR}/tools/delegates/delegate_provider.cc
|
||||
- ${TFLITE_SOURCE_DIR}/tools/evaluation/utils.cc
|
||||
+ # ${TFLITE_SOURCE_DIR}/tools/evaluation/utils.cc
|
||||
)
|
||||
|
||||
set(DELEGATE_PROVIDERS
|
||||
${DELEGATE_PROVIDERS_SUPP}
|
||||
${TFLITE_SOURCE_DIR}/tools/delegates/default_execution_provider.cc
|
||||
# List of delegates referenced as options in the tensorflow/lite/CMakeLists.txt
|
||||
- ${TFLITE_SOURCE_DIR}/tools/delegates/gpu_delegate_provider.cc
|
||||
+ # ${TFLITE_SOURCE_DIR}/tools/delegates/gpu_delegate_provider.cc
|
||||
${TFLITE_SOURCE_DIR}/tools/delegates/nnapi_delegate_provider.cc
|
||||
- ${TFLITE_SOURCE_DIR}/tools/delegates/xnnpack_delegate_provider.cc
|
||||
+ # ${TFLITE_SOURCE_DIR}/tools/delegates/xnnpack_delegate_provider.cc
|
||||
)
|
||||
|
||||
if(TFLITE_ENABLE_EXTERNAL_DELEGATE)
|
||||
@@ -92,9 +92,9 @@ set(TEST_FRAMEWORK_SRC
|
||||
${TFLITE_SOURCE_DIR}/tools/tool_params.cc
|
||||
${TFLITE_SOURCE_DIR}/tools/versioning/op_version.cc
|
||||
${TFLITE_SOURCE_DIR}/tools/versioning/op_signature.cc
|
||||
- ${TF_SOURCE_DIR}/core/platform/default/env_time.cc
|
||||
- ${TF_SOURCE_DIR}/core/platform/default/logging.cc
|
||||
- ${TF_SOURCE_DIR}/core/platform/default/mutex.cc
|
||||
+ ${TF_SOURCE_DIR}/tsl/platform/default/env_time.cc
|
||||
+ ${TF_SOURCE_DIR}/tsl/platform/default/logging.cc
|
||||
+ ${TF_SOURCE_DIR}/tsl/platform/default/mutex.cc
|
||||
internal/test_util.cc
|
||||
acceleration_test_util.cc
|
||||
acceleration_test_util_internal.cc
|
||||
@@ -154,7 +154,8 @@ macro(add_kernel_test TEST_SRC TEST_LIB)
|
||||
set(DELEGATE_TEST "${TEST_NAME}_delegate")
|
||||
add_test(
|
||||
NAME ${DELEGATE_TEST}
|
||||
- COMMAND cmake -DTEST_EXECUTABLE=$<TARGET_FILE:${TEST_NAME}> -P run-tests.cmake
|
||||
+ # COMMAND cmake -DTEST_EXECUTABLE=$<TARGET_FILE:${TEST_NAME}> -P run-tests.cmake
|
||||
+ COMMAND cmake -DTEST_EXECUTABLE=$<TARGET_FILE:${TEST_NAME}> -P ${TFLITE_SOURCE_DIR}/tools/cmake/test_utils/run-tests.cmake
|
||||
)
|
||||
set_tests_properties(${DELEGATE_TEST} PROPERTIES LABELS "delegate")
|
||||
endif()
|
||||
diff --git a/tensorflow/lite/kernels/test_main.cc b/tensorflow/lite/kernels/test_main.cc
|
||||
index 1887533399b..6e3958b77dc 100644
|
||||
--- a/tensorflow/lite/kernels/test_main.cc
|
||||
+++ b/tensorflow/lite/kernels/test_main.cc
|
||||
@@ -16,7 +16,6 @@ limitations under the License.
|
||||
#include <vector>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
-#include "benchmark/benchmark.h" // from @com_google_benchmark
|
||||
#include "tensorflow/lite/kernels/test_delegate_providers.h"
|
||||
#include "tensorflow/lite/kernels/test_util.h"
|
||||
#include "tensorflow/lite/testing/util.h"
|
||||
@@ -51,7 +50,6 @@ int main(int argc, char** argv) {
|
||||
::tflite::LogToStderr();
|
||||
if (InitKernelTest(&argc, argv)) {
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
- benchmark::RunSpecifiedBenchmarks();
|
||||
return RUN_ALL_TESTS();
|
||||
} else {
|
||||
return EXIT_FAILURE;
|
||||
diff --git a/tensorflow/lite/kernels/unidirectional_sequence_lstm_test.cc b/tensorflow/lite/kernels/unidirectional_sequence_lstm_test.cc
|
||||
index cf3fd3a031a..e96f4e3f357 100644
|
||||
--- a/tensorflow/lite/kernels/unidirectional_sequence_lstm_test.cc
|
||||
+++ b/tensorflow/lite/kernels/unidirectional_sequence_lstm_test.cc
|
||||
@@ -18,7 +18,6 @@ limitations under the License.
|
||||
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
-#include "benchmark/benchmark.h" // from @com_google_benchmark
|
||||
#include "flatbuffers/flatbuffers.h" // from @flatbuffers
|
||||
#include "tensorflow/lite/kernels/test_util.h"
|
||||
#include "tensorflow/lite/kernels/unidirectional_sequence_lstm_test_util.h"
|
||||
diff --git a/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake b/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake
|
||||
index 54b413f69ac..d7a2f8ce0f2 100644
|
||||
--- a/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake
|
||||
+++ b/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake
|
||||
@@ -23,7 +23,7 @@ OverridableFetchContent_Declare(
|
||||
flatbuffers
|
||||
GIT_REPOSITORY https://github.com/google/flatbuffers
|
||||
# Sync with tensorflow/third_party/flatbuffers/workspace.bzl
|
||||
- GIT_TAG v2.0.6
|
||||
+ GIT_TAG v2.0.8
|
||||
GIT_SHALLOW TRUE
|
||||
GIT_PROGRESS TRUE
|
||||
SOURCE_DIR "${CMAKE_BINARY_DIR}/flatbuffers"
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
# Copyright 2020-2021 STMicroelectronics
|
||||
DESCRIPTION = "Verisilicon TFLite VX Delegate for STM32 Devices"
|
||||
LICENSE = "MIT"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=7d6260e4f3f6f85de05af9c8f87e6fb5"
|
||||
|
||||
SRCBRANCH_vx = "main"
|
||||
SRCREV_vx = "a975b7ed7a5797812d3c5bdb7310ee92164d0a35"
|
||||
|
||||
SRCBRANCH_tf = "r2.11"
|
||||
SRCREV_tf = "5d37bd0350f0144632629c1aa2ebaef6ca76300b"
|
||||
|
||||
SRC_URI = "git://github.com/VeriSilicon/tflite-vx-delegate.git;branch=${SRCBRANCH_vx};name=vx;destsuffix=git_vx/;protocol=https \
|
||||
git://github.com/tensorflow/tensorflow;branch=${SRCBRANCH_tf};name=tf;destsuffix=git_tf/;protocol=https "
|
||||
SRC_URI += "file://0001-tflite-vx-delegate-fix-to-support-tflite-2-11.patch;patchdir=${WORKDIR}/git_tf"
|
||||
|
||||
PV = "2.11.0+git${SRCREV_vx}"
|
||||
S = "${WORKDIR}/git_vx"
|
||||
COMPATIBLE_MACHINE = "stm32mp25common"
|
||||
|
||||
inherit cmake
|
||||
DEPENDS += "tim-vx patchelf-native"
|
||||
|
||||
python () {
|
||||
#Get major of the PV variable
|
||||
version = d.getVar('PV')
|
||||
version = version.split("+")
|
||||
version_base = version[0]
|
||||
version = version_base.split(".")
|
||||
major = version[0]
|
||||
d.setVar('MAJOR', major)
|
||||
d.setVar('PVB', version_base)
|
||||
}
|
||||
|
||||
do_configure[network] = "1"
|
||||
|
||||
do_configure:prepend() {
|
||||
if [ -n "${http_proxy}" ]; then
|
||||
export HTTP_PROXY=${http_proxy}
|
||||
export http_proxy=${http_proxy}
|
||||
fi
|
||||
if [ -n "${https_proxy}" ]; then
|
||||
export HTTPS_PROXY=${https_proxy}
|
||||
export https_proxy=${https_proxy}
|
||||
fi
|
||||
unset FC
|
||||
}
|
||||
|
||||
EXTRA_OECMAKE += " -DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=${WORKDIR}/git_tf \
|
||||
-DTIM_VX_INSTALL=${STAGING_DIR_TARGET}/usr \
|
||||
-DTFLITE_ENABLE_XNNPACK=OFF \
|
||||
-DTFLITE_ENABLE_EXTERNAL_DELEGATE=ON \
|
||||
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
|
||||
"
|
||||
|
||||
do_install() {
|
||||
# Install libvx_delegate.so into libdir
|
||||
install -d ${D}${libdir}
|
||||
install -d ${D}${includedir}/VX
|
||||
install -m 0755 ${WORKDIR}/build/libvx_delegate.so ${D}${libdir}/libvx_delegate.so.${PVB}
|
||||
patchelf --set-soname libvx_delegate.so ${D}${libdir}/libvx_delegate.so.${PVB}
|
||||
ln -sf libvx_delegate.so.${PVB} ${D}${libdir}/libvx_delegate.so.${MAJOR}
|
||||
ln -sf libvx_delegate.so.${PVB} ${D}${libdir}/libvx_delegate.so
|
||||
|
||||
# Install cusom static lib
|
||||
install -m 0755 libvx_custom_op.a ${D}${libdir}/libvx_custom_op.a
|
||||
install -m 0644 ${S}/vsi_npu_custom_op.h ${D}${includedir}/VX/vsi_npu_custom_op.h
|
||||
}
|
||||
|
||||
FILES:${PN} += " ${libdir}/libvx_delegate.so.${MAJOR} \
|
||||
${libdir}/libvx_delegate.so.${PVB} \
|
||||
"
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
From 23cdc22779175fea6d73848a98e85702d99051c9 Mon Sep 17 00:00:00 2001
|
||||
From: Maxence GUILHIN <maxence.guilhin@st.com>
|
||||
Date: Mon, 4 Dec 2023 11:19:21 +0100
|
||||
Subject: [PATCH 1/1] tim-vx-tests : disable AVG_ANDROID tests which fails with
|
||||
tensor HDL OFF
|
||||
|
||||
Signed-off-by: Maxence GUILHIN <maxence.guilhin@st.com>
|
||||
---
|
||||
src/tim/transform/average_pool_layout_infer_test.cc | 2 +-
|
||||
src/tim/vx/ops/avg_pool_test.cc | 6 +++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/tim/transform/average_pool_layout_infer_test.cc b/src/tim/transform/average_pool_layout_infer_test.cc
|
||||
index 0ff8115..07048f3 100644
|
||||
--- a/src/tim/transform/average_pool_layout_infer_test.cc
|
||||
+++ b/src/tim/transform/average_pool_layout_infer_test.cc
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "tim/transform/layout_inference.h"
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
-TEST(AVG_ANDROID, layout_infer_) {
|
||||
+TEST(AVG_ANDROID, DISABLED_layout_infer_) {
|
||||
auto ctx = tim::vx::Context::Create();
|
||||
auto graph = ctx->CreateGraph();
|
||||
|
||||
diff --git a/src/tim/vx/ops/avg_pool_test.cc b/src/tim/vx/ops/avg_pool_test.cc
|
||||
index 3a9aed8..3f3f17d 100644
|
||||
--- a/src/tim/vx/ops/avg_pool_test.cc
|
||||
+++ b/src/tim/vx/ops/avg_pool_test.cc
|
||||
@@ -463,7 +463,7 @@ TEST(AVG, shape_60_52_3_5_fp32_kernel_35_stride_5) {
|
||||
ArraysMatch(golden, output,1e-4f);
|
||||
}
|
||||
|
||||
-TEST(AVG_ANDROID, shape_60_52_3_5_fp32_kernel_35_stride_5) {
|
||||
+TEST(AVG_ANDROID, DISABLED_shape_60_52_3_5_fp32_kernel_35_stride_5) {
|
||||
auto ctx = tim::vx::Context::Create();
|
||||
auto graph = ctx->CreateGraph();
|
||||
|
||||
@@ -529,7 +529,7 @@ TEST(AVG_ANDROID, shape_60_52_3_5_fp32_kernel_35_stride_5) {
|
||||
ArraysMatch(golden, output, 1e-5f);
|
||||
}
|
||||
|
||||
-TEST(AVG_ANDROID, shape_60_52_3_5_fp32_kernel_50_stride_5) {
|
||||
+TEST(AVG_ANDROID, DISABLED_shape_60_52_3_5_fp32_kernel_50_stride_5) {
|
||||
auto ctx = tim::vx::Context::Create();
|
||||
auto graph = ctx->CreateGraph();
|
||||
|
||||
@@ -578,7 +578,7 @@ TEST(AVG_ANDROID, shape_60_52_3_5_fp32_kernel_50_stride_5) {
|
||||
ArraysMatch(golden, output, 1e-5f);
|
||||
}
|
||||
|
||||
-TEST(AVG_ANDROID, shape_60_52_3_5_uint8_kernel_35_stride_5) {
|
||||
+TEST(AVG_ANDROID, DISABLED_shape_60_52_3_5_uint8_kernel_35_stride_5) {
|
||||
auto ctx = tim::vx::Context::Create();
|
||||
auto graph = ctx->CreateGraph();
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
DESCRIPTION = "TIM-VX is a software integration module provided by VeriSilicon to facilitate \
|
||||
deployment of Neural-Networks on OpenVX enabled ML accelerators. It serves as the backend \
|
||||
binding for runtime frameworks such as Android NN, Tensorflow-Lite, MLIR, TVM and more."
|
||||
SUMMARY = "Tensor Interface Module for OpenVX"
|
||||
HOMEPAGE = "https://github.com/VeriSilicon/TIM-VX"
|
||||
LICENSE = "MIT"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=d72cd187d764d96d91db827cb65b48a7"
|
||||
|
||||
SRCBRANCH_tim_vx = "main"
|
||||
SRCREV_tim_vx = "33f3a4f176ff9c407479eaf6be78c52bb3c7a939"
|
||||
SRC_URI ="git://github.com/VeriSilicon/TIM-VX.git;branch=${SRCBRANCH_tim_vx};name=tim_vx;destsuffix=tim_vx_git/;protocol=https"
|
||||
SRC_URI += " file://0001-tim-vx-tests-disable-AVG_ANDROID-tests.patch"
|
||||
|
||||
|
||||
SRCBRANCH_googletest = "main"
|
||||
SRCREV_googletest = "eab0e7e289db13eabfc246809b0284dac02a369d"
|
||||
SRC_URI +="git://github.com/google/googletest;branch=${SRCBRANCH_googletest};name=googletest;destsuffix=googletest/;protocol=https "
|
||||
|
||||
|
||||
PV = "1.1.57+git${SRCREV_tim_vx}"
|
||||
PV_googletest = "1.14.0"
|
||||
|
||||
S = "${WORKDIR}/tim_vx_git"
|
||||
|
||||
# Only compatible with stm32mp25
|
||||
COMPATIBLE_MACHINE = "stm32mp25common"
|
||||
|
||||
python () {
|
||||
#Get major of the PV variable
|
||||
version = d.getVar('PV')
|
||||
version = version.split("+")
|
||||
version_base = version[0]
|
||||
version = version_base.split(".")
|
||||
major = version[0]
|
||||
d.setVar('MAJOR', major)
|
||||
d.setVar('PVB', version_base)
|
||||
}
|
||||
|
||||
inherit cmake
|
||||
DEPENDS += " patchelf-native \
|
||||
gcnano-driver-stm32mp \
|
||||
gcnano-userland \
|
||||
gtest \
|
||||
googletest \
|
||||
"
|
||||
|
||||
EXTRA_OECMAKE = " \
|
||||
-DCONFIG=YOCTO \
|
||||
-DCMAKE_SYSROOT=${RECIPE_SYSROOT} \
|
||||
-DTIM_VX_ENABLE_TEST=ON \
|
||||
-DCMAKE_SKIP_RPATH=TRUE \
|
||||
-DFETCHCONTENT_FULLY_DISCONNECTED=OFF \
|
||||
-DTIM_VX_USE_EXTERNAL_OVXLIB=ON \
|
||||
-DTIM_VX_DBG_ENABLE_TENSOR_HNDL=OFF \
|
||||
-DOVXLIB_INC=${S}/src/tim/vx/internal/include/ \
|
||||
-DOVXLIB_LIB=${STAGING_LIBDIR}/libovxlib.so \
|
||||
-DFETCHCONTENT_SOURCE_DIR_GOOGLETEST=${WORKDIR}/googletest \
|
||||
"
|
||||
do_configure[network] = "1"
|
||||
|
||||
do_install() {
|
||||
# Install libtim-vx.so into libdir
|
||||
install -d ${D}${libdir}
|
||||
install -d ${D}/usr/local/bin/${PN}-${PVB}
|
||||
install -d ${D}/home/weston
|
||||
|
||||
install -m 0755 ${WORKDIR}/build/src/tim/libtim-vx.so ${D}${libdir}/libtim-vx.so.${PVB}
|
||||
patchelf --set-soname libtim-vx.so ${D}${libdir}/libtim-vx.so.${PVB}
|
||||
|
||||
ln -sf libtim-vx.so.${PVB} ${D}${libdir}/libtim-vx.so.${MAJOR}
|
||||
ln -sf libtim-vx.so.${PVB} ${D}${libdir}/libtim-vx.so
|
||||
|
||||
# Install other libraries for benchmark
|
||||
install -m 0755 ${WORKDIR}/build/lib/libgtest_main.so ${D}${libdir}/libgtest_main.so.${PV_googletest}
|
||||
install -m 0755 ${WORKDIR}/build/lib/libgtest.so ${D}${libdir}/libgtest.so.${PV_googletest}
|
||||
install -m 0755 ${WORKDIR}/build/lib/libgmock_main.so ${D}${libdir}/libgmock_main.so
|
||||
install -m 0755 ${WORKDIR}/build/lib/libgmock.so ${D}${libdir}/libgmock.so
|
||||
install -m 0755 ${WORKDIR}/build/src/tim/unit_test ${D}/usr/local/bin/${PN}-${PVB}/TIM-VX_test
|
||||
|
||||
# Include
|
||||
install -d ${D}${includedir}
|
||||
cp -r ${S}/include/tim ${D}${includedir}
|
||||
cp -r ${STAGING_INCDIR}/CL/cl_viv_vx_ext.h ${D}/usr/local/bin/${PN}-${PVB}/cl_viv_vx_ext.h
|
||||
cp -r ${STAGING_INCDIR}/CL/cl_viv_vx_ext.h ${D}/home/weston/cl_viv_vx_ext.h
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-tools"
|
||||
FILES_SOLIBSDEV = ""
|
||||
|
||||
FILES:${PN}-tools = " /usr/local/bin/${PN}-${PVB}/TIM-VX_test \
|
||||
/usr/local/bin/${PN}-${PVB}/cl_viv_vx_ext.h \
|
||||
/home/weston/cl_viv_vx_ext.h \
|
||||
${libdir}/libgtest_main.so.${PV_googletest} \
|
||||
${libdir}/libgtest.so.${PV_googletest} \
|
||||
${libdir}/libgmock_main.so \
|
||||
${libdir}/libgmock.so \
|
||||
"
|
||||
|
||||
FILES:${PN} += " ${libdir}/libtim-vx.so.${MAJOR} \
|
||||
${libdir}/libtim-vx.so.${PVB} \
|
||||
${libdir}/libtim-vx.so \
|
||||
"
|
||||
|
||||
INSANE_SKIP:${PN} += " dev-so "
|
||||
|
|
@ -32,4 +32,5 @@ RDEPENDS:packagegroup-x-linux-ai-tflite:append:ccmp25 = " \
|
|||
tflite-object-detection-python \
|
||||
tflite-pose-estimation-python \
|
||||
tflite-semantic-segmentation-python \
|
||||
tim-vx \
|
||||
"
|
||||
|
|
|
|||
|
|
@ -66,8 +66,12 @@ bluetooth_start() {
|
|||
}
|
||||
|
||||
bluetooth_stop() {
|
||||
# Remove the kernel module
|
||||
rmmod "${MODULE_NAME}"
|
||||
#
|
||||
# The btnxpuart driver hits a null pointer dereference on module
|
||||
# unloading when the interface is down. So as a workaround, make
|
||||
# sure the interface is UP before unloading the module.
|
||||
#
|
||||
hciconfig "${HCI_IFACE}" up && rmmod "${MODULE_NAME}"
|
||||
power 0
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
[Unit]
|
||||
Description=Initialization of the IW612 bluetooth chip
|
||||
ConditionPathIsDirectory=/proc/device-tree/bluetooth
|
||||
After=systemd-udev-settle.service bluetooth.service
|
||||
After=systemd-udev-settle.service
|
||||
Before=bluetooth.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ do_install:append:ccimx6ul() {
|
|||
fi
|
||||
}
|
||||
|
||||
pkg_postinst_ontarget:${PN}() {
|
||||
pkg_postinst_ontarget:${PN}-daemon() {
|
||||
# If dualboot is enabled, change the CCCSD download path and set on the fly to yes on the first boot
|
||||
if [ "$(fw_printenv -n dualboot 2>/dev/null)" = "yes" ]; then
|
||||
sed -i "/firmware_download_path = \/mnt\/update/c\firmware_download_path = \/home\/root" /etc/cccs.conf
|
||||
|
|
@ -96,6 +96,7 @@ pkg_postinst_ontarget:${PN}() {
|
|||
fi
|
||||
}
|
||||
|
||||
REMOVE_POSTINST_RPN = "${PN}-daemon"
|
||||
inherit ${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "remove-pkg-postinst-ontarget", \
|
||||
oe.utils.ifelse(d.getVar("CCCS_CONF_PATH"), "remove-pkg-postinst-ontarget", ""), d)}
|
||||
|
||||
|
|
@ -152,15 +153,21 @@ CONFFILES:${PN}-daemon += "${sysconfdir}/cccs.conf"
|
|||
|
||||
CONFFILES:${PN}-legacy += "${sysconfdir}/cc.conf"
|
||||
|
||||
RDEPENDS:${PN}-daemon = "${PN} ${PN}-cert"
|
||||
# 'cccsd-init' script uses '/etc/init.d/functions'
|
||||
RDEPENDS:${PN}-daemon = " \
|
||||
${PN} \
|
||||
${PN}-cert \
|
||||
initscripts-functions \
|
||||
libubootenv \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN}-gs-demo = "${PN}-daemon"
|
||||
# 'cccsd-gs-demo-init' script uses '/etc/init.d/functions'
|
||||
RDEPENDS:${PN}-gs-demo = " \
|
||||
${PN}-daemon \
|
||||
initscripts-functions \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN}-legacy = "${PN} ${PN}-cert"
|
||||
|
||||
# 'cccsd-init' and 'cccs-gs-demo-init' scripts use '/etc/init.d/functions'
|
||||
RDEPENDS:${PN}-daemon += "initscripts-functions"
|
||||
RDEPENDS:${PN}-gs-demo += "initscripts-functions"
|
||||
|
||||
# Disable extra compilation checks from SECURITY_CFLAGS to avoid build errors
|
||||
lcl_maybe_fortify:pn-cccs = ""
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ fi
|
|||
|
||||
# Variables.
|
||||
FS_TYPE="ext4"
|
||||
LINUX_DEV_BLOCK="/dev/mmcblk0p1"
|
||||
LINUX_DEV_BLOCK="/dev/mmcblk0p$(fdisk -l /dev/mmcblk0 | sed -ne "s,^[^0-9]*\([0-9]\+\).*\<linux\>.*,\1,g;T;p")"
|
||||
LINUX_MOUNT_POINT="/mnt/linux"
|
||||
ROOTFS_DEV_BLOCK="/dev/mmcblk0p3"
|
||||
ROOTFS_DEV_BLOCK="/dev/mmcblk0p$(fdisk -l /dev/mmcblk0 | sed -ne "s,^[^0-9]*\([0-9]\+\).*\<rootfs\>.*,\1,g;T;p")"
|
||||
ROOTFS_MOUNT_POINT="/system"
|
||||
|
||||
# Determines whether the file system type is UBI or not.
|
||||
|
|
|
|||
|
|
@ -31,11 +31,9 @@ fi
|
|||
|
||||
# Variables.
|
||||
BLOCK_SIZE=4096
|
||||
ROOTFS_NAME="rootfs"
|
||||
ROOTFS_SOURCE_ENDPOINT="/dev/rdiff_source_rootfs"
|
||||
ROOTFS_DEV_BLOCK="mmcblk0p3"
|
||||
ROOTFS_DEV_BLOCK_A="mmcblk0p3"
|
||||
ROOTFS_DEV_BLOCK_B="mmcblk0p4"
|
||||
ROOTFS_DEV_BLOCK_A="mmcblk0p$(fdisk -l /dev/mmcblk0 | sed -ne "s,^[^0-9]*\([0-9]\+\).*\<rootfs_a\>.*,\1,g;T;p")"
|
||||
ROOTFS_DEV_BLOCK_B="mmcblk0p$(fdisk -l /dev/mmcblk0 | sed -ne "s,^[^0-9]*\([0-9]\+\).*\<rootfs_b\>.*,\1,g;T;p")"
|
||||
|
||||
# Determines whether the file system type is UBIFS or not.
|
||||
is_ubifs() {
|
||||
|
|
@ -141,23 +139,16 @@ get_ubi_volume() {
|
|||
# For this reason, hook the source update to a well known endpoint and just create the
|
||||
# required link from the running system once all the information is available.
|
||||
create_source_endpoint() {
|
||||
# Initialize vars. Assume system is MMC based.
|
||||
local rootfs_source_partiton="${ROOTFS_NAME}"
|
||||
local rootfs_source_dev="${ROOTFS_DEV_BLOCK}"
|
||||
|
||||
# Remove previous link.
|
||||
[ -L "${ROOTFS_SOURCE_ENDPOINT}" ] && unlink "${ROOTFS_SOURCE_ENDPOINT}"
|
||||
|
||||
# Update variables for dualboot systems.
|
||||
if is_dualboot; then
|
||||
local active_part="$(get_active_system)"
|
||||
rootfs_source_partiton="${rootfs_source_partiton}_${active_part}"
|
||||
rootfs_source_partiton="rootfs_${active_part}"
|
||||
if [ "${active_part}" = "a" ]; then
|
||||
rootfs_source_dev=${ROOTFS_DEV_BLOCK_A}
|
||||
else
|
||||
rootfs_source_dev=${ROOTFS_DEV_BLOCK_B}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Update variables for MTD systems.
|
||||
if is_ubifs; then
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ python do_swuimage:prepend() {
|
|||
}
|
||||
|
||||
# Upgrade available.
|
||||
UPGRADE_AVAILABLE = ""
|
||||
UPGRADE_AVAILABLE = "0"
|
||||
UPGRADE_AVAILABLE:ccimx6 = "1"
|
||||
|
||||
# Create and fill 'sw-description' file.
|
||||
|
|
|
|||
Loading…
Reference in New Issue