-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tensorflow support to v2.14.0
tflite-vx-delegate can support v2.14.0 now Type: Code Improvement Signed-off-by: Feiyue Chen <[email protected]>
- Loading branch information
1 parent
d8552f8
commit 43bf5fd
Showing
3 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,8 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git config --global user.name "xiang.zhang" | ||
git clone https://github.com/tensorflow/tensorflow.git ${{github.workspace}}/3rd-party/tensorflow | ||
cd ${{github.workspace}}/3rd-party/tensorflow && git checkout v2.11.0 | ||
patch -p1 < ${{github.workspace}}/patches/tf_2_11_kernel_test.patch | ||
cd ${{github.workspace}}/3rd-party/tensorflow && git checkout v2.14.0 | ||
patch -p1 < ${{github.workspace}}/patches/tf_2_14_kernel_test.patch | ||
- name: Configure CMake | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
commit 7e36b6163224da7fc0a2aa4721892a48da85fbed | ||
Author: Feiyue Chen <[email protected]> | ||
Date: Mon Dec 18 07:29:04 2023 +0000 | ||
|
||
fixed kerneltest building error | ||
|
||
diff --git a/tensorflow/lite/kernels/CMakeLists.txt b/tensorflow/lite/kernels/CMakeLists.txt | ||
index 57ed10d7e64..d3e10a7de1a 100644 | ||
--- a/tensorflow/lite/kernels/CMakeLists.txt | ||
+++ b/tensorflow/lite/kernels/CMakeLists.txt | ||
@@ -91,6 +91,7 @@ set(TEST_FRAMEWORK_SRC | ||
${TFLITE_SOURCE_DIR}/tools/optimize/operator_property.cc | ||
${TFLITE_SOURCE_DIR}/tools/optimize/quantization_utils.cc | ||
${TFLITE_SOURCE_DIR}/tools/tool_params.cc | ||
+ ${TFLITE_SOURCE_DIR}/tools/versioning/op_signature.cc | ||
${TFLITE_SOURCE_DIR}/tools/versioning/op_version.cc | ||
${TF_SOURCE_DIR}/tsl/platform/default/env_time.cc | ||
${TF_SOURCE_DIR}/tsl/platform/default/logging.cc | ||
diff --git a/tensorflow/lite/kernels/if_test.cc b/tensorflow/lite/kernels/if_test.cc | ||
index 5fd734bba86..580a54e3e43 100644 | ||
--- a/tensorflow/lite/kernels/if_test.cc | ||
+++ b/tensorflow/lite/kernels/if_test.cc | ||
@@ -20,7 +20,11 @@ limitations under the License. | ||
|
||
#include <gtest/gtest.h> | ||
#include "tensorflow/lite/core/interpreter.h" | ||
+ | ||
+#ifdef TFLITE_BUILD_WITH_XNNPACK_DELEGATE | ||
#include "tensorflow/lite/delegates/xnnpack/xnnpack_delegate.h" | ||
+#endif | ||
+ | ||
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h" | ||
#include "tensorflow/lite/kernels/kernel_util.h" | ||
#include "tensorflow/lite/kernels/subgraph_test_util.h" | ||
@@ -162,6 +166,7 @@ TEST_F(DynamicSubgraphIfTest, TestIfFalse) { | ||
|
||
class IfTest : public ControlFlowOpTest {}; | ||
|
||
+#ifdef TFLITE_BUILD_WITH_XNNPACK_DELEGATE | ||
TEST_F(IfTest, TestWithXNNPACK) { | ||
interpreter_ = std::make_unique<Interpreter>(); | ||
AddSubgraphs(2); | ||
@@ -203,6 +208,7 @@ TEST_F(IfTest, TestWithXNNPACK) { | ||
ASSERT_EQ(interpreter_->Invoke(), kTfLiteOk); | ||
TfLiteXNNPackDelegateDelete(xnnpack_delegate); | ||
} | ||
+#endif | ||
|
||
TEST_F(IfTest, TestInputIsOutput) { | ||
interpreter_ = std::make_unique<Interpreter>(); | ||
diff --git a/tensorflow/lite/kernels/while_test.cc b/tensorflow/lite/kernels/while_test.cc | ||
index 0e0a3e43a72..90c55a55525 100644 | ||
--- a/tensorflow/lite/kernels/while_test.cc | ||
+++ b/tensorflow/lite/kernels/while_test.cc | ||
@@ -18,7 +18,11 @@ limitations under the License. | ||
#include <vector> | ||
|
||
#include "tensorflow/lite/core/interpreter.h" | ||
+ | ||
+#ifdef TFLITE_BUILD_WITH_XNNPACK_DELEGATE | ||
#include "tensorflow/lite/delegates/xnnpack/xnnpack_delegate.h" | ||
+#endif | ||
+ | ||
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h" | ||
#include "tensorflow/lite/kernels/subgraph_test_util.h" | ||
#include "tensorflow/lite/profiling/memory_info.h" | ||
@@ -36,6 +40,7 @@ namespace { | ||
|
||
class WhileTest : public ControlFlowOpTest {}; | ||
|
||
+#ifdef TFLITE_BUILD_WITH_XNNPACK_DELEGATE | ||
TEST_F(WhileTest, TestWithXNNPACK) { | ||
interpreter_ = std::make_unique<Interpreter>(); | ||
AddSubgraphs(2); | ||
@@ -73,6 +78,7 @@ TEST_F(WhileTest, TestWithXNNPACK) { | ||
ASSERT_EQ(interpreter_->Invoke(), kTfLiteOk); | ||
TfLiteXNNPackDelegateDelete(xnnpack_delegate); | ||
} | ||
+#endif | ||
|
||
TEST_F(WhileTest, TestInputIsOutput) { | ||
interpreter_ = std::make_unique<Interpreter>(); |