nnstreamer: Update nnstreamer_2.4.0.bb to commit 8070609

Update nnstreamer dependency, nnstreamer-edge_0.2.4.bb to commit 2bf50d5

Signed-off-by: Nolann Chobert <nolann.chobert@nxp.com>
This commit is contained in:
Nolann Chobert 2024-10-15 10:11:06 +02:00 committed by Tom Hochstein
parent 1d47c988c4
commit 5e6ed67030
3 changed files with 29 additions and 29 deletions

View File

@ -8,8 +8,8 @@ DEPENDS = "\
"
NNS_EDGE_SRC ?= "git://github.com/nnstreamer/nnstreamer-edge.git;protocol=https"
SRCBRANCH = "lts/0.1.0.b"
SRCREV = "2efc10afd1161a025fa3848aca487fb9a665f3c0"
SRCBRANCH = "lts/0.2.4.b"
SRCREV = "2bf50d57f0f8d856ae38cf82b0a0f3746f46a08a"
SRC_URI = "${NNS_EDGE_SRC};branch=${SRCBRANCH}"
S = "${WORKDIR}/git"

View File

@ -1,6 +1,6 @@
From 9bfd1392d8933a6edb61639cecffdaddb601f380 Mon Sep 17 00:00:00 2001
From baa131798d24b6b23f6891978e0e69de8a5954d1 Mon Sep 17 00:00:00 2001
From: Nicolas <nicolas.goueslain@nxp.com>
Date: Mon, 2 Sep 2024 12:36:04 +0200
Date: Fri, 6 Sep 2024 17:02:43 +0200
Subject: [PATCH] AIR-11938: tensor-filter-use-memcpy-ethosu-delegate
Upstream-Status: Inappropriate [i.MX specific]
@ -11,10 +11,10 @@ Signed-off-by: Nicolas <nicolas.goueslain@nxp.com>
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc b/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc
index e9394398..ec1c9002 100644
index 78b7df33..040bc29e 100644
--- a/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc
+++ b/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc
@@ -214,6 +214,7 @@ class TFLiteInterpreter
@@ -218,6 +218,7 @@ class TFLiteInterpreter
char *model_path;
bool is_cached_after_first_invoke; /**< To cache again after first invoke */
bool is_xnnpack_delegated; /**< To check if XNNPACK delegate is used */
@ -22,7 +22,7 @@ index e9394398..ec1c9002 100644
char *ext_delegate_path; /**< path to external delegate lib */
GHashTable *ext_delegate_kv_table; /**< external delegate key values options */
@@ -297,6 +298,7 @@ TFLiteInterpreter::TFLiteInterpreter ()
@@ -301,6 +302,7 @@ TFLiteInterpreter::TFLiteInterpreter ()
is_cached_after_first_invoke = false;
is_xnnpack_delegated = false;
@ -30,32 +30,32 @@ index e9394398..ec1c9002 100644
}
/**
@@ -331,7 +333,7 @@ TFLiteInterpreter::invoke (const GstTensorMemory *input, GstTensorMemory *output
* Therefore tensor data is to be manually copied from/to input/output GStreamer
* buffers memory whose address changes at every round.
@@ -335,7 +337,7 @@ TFLiteInterpreter::invoke (const GstTensorMemory *input, GstTensorMemory *output
* Therefore tensor data is to be manually copied from/to input/output
* GStreamer buffers memory whose address changes at every round.
*/
- if (is_xnnpack_delegated) {
+ if (is_xnnpack_delegated || is_ethosu_delegated) {
for (unsigned int i = 0; i < inputTensorMeta.num_tensors; ++i) {
tensor_ptr = inputTensorPtr[i];
g_assert(tensor_ptr->bytes == input[i].size);
@@ -356,7 +358,7 @@ TFLiteInterpreter::invoke (const GstTensorMemory *input, GstTensorMemory *output
start_time = g_get_monotonic_time ();
status = interpreter->Invoke ();
- if (is_xnnpack_delegated) {
+ if (is_xnnpack_delegated || is_ethosu_delegated) {
g_assert (tensor_ptr->bytes == input[i].size);
@@ -364,7 +366,7 @@ TFLiteInterpreter::invoke (const GstTensorMemory *input, GstTensorMemory *output
* After the very first invoke, the output buffer address may change.
* To handle the case, memcpy the output buffer directly.
*/
- if (is_xnnpack_delegated || !is_cached_after_first_invoke) {
+ if (is_xnnpack_delegated || is_ethosu_delegated || !is_cached_after_first_invoke) {
for (unsigned int i = 0; i < outputTensorMeta.num_tensors; ++i) {
tensor_ptr = outputTensorPtr[i];
g_assert(tensor_ptr->bytes == output[i].size);
@@ -518,7 +520,9 @@ TFLiteInterpreter::loadModel (int num_threads, tflite_delegate_e delegate_e)
TfLiteExternalDelegateOptions options;
g_assert (tensor_ptr->bytes == output[i].size);
@@ -523,7 +525,9 @@ TFLiteInterpreter::loadModel (int num_threads, tflite_delegate_e delegate_e)
TfLiteExternalDelegateOptions options;
options = TfLiteExternalDelegateOptionsDefault (ext_delegate_path);
options = TfLiteExternalDelegateOptionsDefault (ext_delegate_path);
-
+ if (strcmp(ext_delegate_path, "libethosu_delegate.so") == 0){
+ is_ethosu_delegated = true;
+ }
/* Add optional key values to delegate configuration */
if (ext_delegate_kv_table) {
GHashTable *table = ext_delegate_kv_table;
+ if (strcmp(ext_delegate_path, "libethosu_delegate.so") == 0){
+ is_ethosu_delegated = true;
+ }
/* Add optional key values to delegate configuration */
if (ext_delegate_kv_table) {
GHashTable *table = ext_delegate_kv_table;

View File

@ -18,8 +18,8 @@ DEPENDS = "\
libpng \
"
SRCREV = "f82789170b8f2696e50cbc5027b74b767f5e9415"
SRC_URI = "git://github.com/nnstreamer/nnstreamer.git;branch=main;protocol=https \
SRCREV = "807060954acfdb6cec130559d00eef1af61457cf"
SRC_URI = "git://github.com/nnstreamer/nnstreamer.git;branch=lts/2.4.0.b;protocol=https \
file://0001-PATCH-increase-to-cpp17-version.patch \
file://0001-AIR-11938-tensor-filter-use-memcpy-ethosu-delegate.patch \
"