Move bindings/tflite/ to runtime/bindings/tflite/. (#9043)
This relates to https://github.com/google/iree/issues/8955 and was discussed [on discord here](https://discord.com/channels/689900678990135345/690274711523164166/969267557938917377).
There are a few tests in this directory that have dependencies on the compiler (via `iree_bytecode_module`), but those are optionally enabled based on build features (`IREE_BUILD_COMPILER` and `IREE_BUILD_TESTS` in CMake).
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index b101f0d..7a66336 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -22,7 +22,7 @@
# Bindings
/bindings/python/ @stellaraccident
/runtime/bindings/python/ @stellaraccident
-/bindings/tflite/ @benvanik
+/runtime/bindings/tflite/ @benvanik
# Integrations
/integrations/ @benvanik @stellaraccident
diff --git a/.github/workflows/android_tflite_oneshot_build.yml b/.github/workflows/android_tflite_oneshot_build.yml
index 7da95ed..eda834a 100644
--- a/.github/workflows/android_tflite_oneshot_build.yml
+++ b/.github/workflows/android_tflite_oneshot_build.yml
@@ -23,5 +23,5 @@
bash -c build_tools/gradle/build_tflite_android_library.sh
- uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # v2
with:
- path: ./bindings/tflite/java/build/outputs/aar/*.aar
+ path: ./runtime/bindings/tflite/java/build/outputs/aar/*.aar
retention-days: 1
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b7747b8..0c9f323 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -663,7 +663,7 @@
endif()
if(IREE_BUILD_BINDINGS_TFLITE)
- add_subdirectory(bindings/tflite)
+ add_subdirectory(runtime/bindings/tflite)
endif()
if(IREE_BUILD_EXPERIMENTAL_REMOTING)
diff --git a/docs/website/docs/getting-started/tflite.md b/docs/website/docs/getting-started/tflite.md
index ddb8f01..ffd4743 100644
--- a/docs/website/docs/getting-started/tflite.md
+++ b/docs/website/docs/getting-started/tflite.md
@@ -146,9 +146,9 @@
models sourced from [TensorFlow Hub](https://tfhub.dev/).
* An example smoke test of the
-[TensorFlow Lite C API](https://github.com/google/iree/tree/main/bindings/tflite)
+[TensorFlow Lite C API](https://github.com/google/iree/tree/main/runtime/bindings/tflite)
is available
-[here](https://github.com/google/iree/blob/main/bindings/tflite/smoke_test.cc).
+[here](https://github.com/google/iree/blob/main/runtime/bindings/tflite/smoke_test.cc).
| Colab notebooks | |
| -- | -- |
@@ -158,6 +158,6 @@
[Issue#3954](https://github.com/google/iree/issues/3954): Add documentation
for an Android demo using the
- [Java TFLite bindings](https://github.com/google/iree/tree/main/bindings/tflite/java),
+ [Java TFLite bindings](https://github.com/google/iree/tree/main/runtime/bindings/tflite/java),
once it is complete at
[not-jenni/iree-android-tflite-demo](https://github.com/not-jenni/iree-android-tflite-demo).
diff --git a/bindings/tflite/BUILD b/runtime/bindings/tflite/BUILD
similarity index 65%
rename from bindings/tflite/BUILD
rename to runtime/bindings/tflite/BUILD
index d3f2e2e..c393d74 100644
--- a/bindings/tflite/BUILD
+++ b/runtime/bindings/tflite/BUILD
@@ -4,6 +4,8 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+load("//iree:build_defs.oss.bzl", "iree_runtime_cc_library", "iree_runtime_cc_test")
+
package(
default_visibility = ["//visibility:public"],
features = ["layering_check"],
@@ -17,7 +19,7 @@
# Use this *in place of tflite*; do not link both this and tflite into your
# binary (you'll get ODR violations at the least, if not worse).
-cc_library(
+iree_runtime_cc_library(
name = "shim",
srcs = [
"interpreter.c",
@@ -38,16 +40,16 @@
],
visibility = ["//visibility:public"],
deps = [
- "//iree/base",
- "//iree/base:core_headers",
- "//iree/base:tracing",
- "//iree/base/internal",
- "//iree/base/internal:synchronization",
- "//iree/hal",
- "//iree/hal/drivers",
- "//iree/modules/hal",
- "//iree/vm",
- "//iree/vm:bytecode_module",
+ "//runtime/src/iree/base",
+ "//runtime/src/iree/base:core_headers",
+ "//runtime/src/iree/base:tracing",
+ "//runtime/src/iree/base/internal",
+ "//runtime/src/iree/base/internal:synchronization",
+ "//runtime/src/iree/hal",
+ "//runtime/src/iree/hal/drivers",
+ "//runtime/src/iree/modules/hal",
+ "//runtime/src/iree/vm",
+ "//runtime/src/iree/vm:bytecode_module",
],
)
@@ -55,20 +57,20 @@
# Tests for our own unique functionality and tflite compatibility
#===------------------------------------------------------------------------===#
-cc_test(
+iree_runtime_cc_test(
name = "smoke_test",
srcs = ["smoke_test.cc"],
# TODO(benvanik): bazel/cmake to include this generated file.
# Checked in right now until I can figure it out.
# data = [
- # "//bindings/tflite/testdata:add.vmfb",
+ # "//runtime/bindings/tflite/testdata:add.vmfb",
# ],
deps = [
":shim",
- "//bindings/tflite/testdata:add_dynamic_c",
- "//bindings/tflite/testdata:add_multi_c",
- "//bindings/tflite/testdata:add_static_c",
- "//iree/testing:gtest",
- "//iree/testing:gtest_main",
+ "//runtime/bindings/tflite/testdata:add_dynamic_c",
+ "//runtime/bindings/tflite/testdata:add_multi_c",
+ "//runtime/bindings/tflite/testdata:add_static_c",
+ "//runtime/src/iree/testing:gtest",
+ "//runtime/src/iree/testing:gtest_main",
],
)
diff --git a/bindings/tflite/CMakeLists.txt b/runtime/bindings/tflite/CMakeLists.txt
similarity index 87%
rename from bindings/tflite/CMakeLists.txt
rename to runtime/bindings/tflite/CMakeLists.txt
index a788227..5860072 100644
--- a/bindings/tflite/CMakeLists.txt
+++ b/runtime/bindings/tflite/CMakeLists.txt
@@ -53,9 +53,9 @@
"smoke_test.cc"
DEPS
::shim
- bindings::tflite::testdata::add_dynamic_c
- bindings::tflite::testdata::add_multi_c
- bindings::tflite::testdata::add_static_c
+ runtime::bindings::tflite::testdata::add_dynamic_c
+ runtime::bindings::tflite::testdata::add_multi_c
+ runtime::bindings::tflite::testdata::add_static_c
iree::testing::gtest
iree::testing::gtest_main
)
diff --git a/bindings/tflite/README.md b/runtime/bindings/tflite/README.md
similarity index 100%
rename from bindings/tflite/README.md
rename to runtime/bindings/tflite/README.md
diff --git a/bindings/tflite/include/README.md b/runtime/bindings/tflite/include/README.md
similarity index 100%
rename from bindings/tflite/include/README.md
rename to runtime/bindings/tflite/include/README.md
diff --git a/bindings/tflite/include/tensorflow/lite/c/c_api.h b/runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h
similarity index 100%
rename from bindings/tflite/include/tensorflow/lite/c/c_api.h
rename to runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h
diff --git a/bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h b/runtime/bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h
similarity index 100%
rename from bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h
rename to runtime/bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h
diff --git a/bindings/tflite/include/tensorflow/lite/c/common.h b/runtime/bindings/tflite/include/tensorflow/lite/c/common.h
similarity index 100%
rename from bindings/tflite/include/tensorflow/lite/c/common.h
rename to runtime/bindings/tflite/include/tensorflow/lite/c/common.h
diff --git a/bindings/tflite/interpreter.c b/runtime/bindings/tflite/interpreter.c
similarity index 99%
rename from bindings/tflite/interpreter.c
rename to runtime/bindings/tflite/interpreter.c
index cfa4da0..497cd5a 100644
--- a/bindings/tflite/interpreter.c
+++ b/runtime/bindings/tflite/interpreter.c
@@ -4,15 +4,15 @@
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#include "bindings/tflite/interpreter.h"
+#include "runtime/bindings/tflite/interpreter.h"
-#include "bindings/tflite/model.h"
-#include "bindings/tflite/shim.h"
-#include "bindings/tflite/tensor.h"
#include "iree/base/internal/call_once.h"
#include "iree/base/tracing.h"
#include "iree/hal/drivers/init.h"
#include "iree/modules/hal/module.h"
+#include "runtime/bindings/tflite/model.h"
+#include "runtime/bindings/tflite/shim.h"
+#include "runtime/bindings/tflite/tensor.h"
//===----------------------------------------------------------------------===//
// HAL / driver support
diff --git a/bindings/tflite/interpreter.h b/runtime/bindings/tflite/interpreter.h
similarity index 83%
rename from bindings/tflite/interpreter.h
rename to runtime/bindings/tflite/interpreter.h
index 7145954..11d0b87 100644
--- a/bindings/tflite/interpreter.h
+++ b/runtime/bindings/tflite/interpreter.h
@@ -7,16 +7,16 @@
#ifndef IREE_BINDINGS_TFLITE_INTERPRETER_H_
#define IREE_BINDINGS_TFLITE_INTERPRETER_H_
-#include "bindings/tflite/model.h"
-#include "bindings/tflite/options.h"
#include "iree/base/api.h"
#include "iree/hal/api.h"
#include "iree/vm/api.h"
+#include "runtime/bindings/tflite/model.h"
+#include "runtime/bindings/tflite/options.h"
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
-#include "bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
struct TfLiteInterpreter {
iree_allocator_t allocator;
diff --git a/bindings/tflite/java/README.md b/runtime/bindings/tflite/java/README.md
similarity index 83%
rename from bindings/tflite/java/README.md
rename to runtime/bindings/tflite/java/README.md
index 0c0e875..26cfdfa 100644
--- a/bindings/tflite/java/README.md
+++ b/runtime/bindings/tflite/java/README.md
@@ -4,14 +4,14 @@
Process for building the AAR library:
-1. Start AndroidStudio. Select _Open File or Project_ then choose `iree/bindings/tflite/java/gragle.build`
-2. AndroidStudio should sync the project and setup gradlew uner `iree/bindings/tflite/java`
+1. Start AndroidStudio. Select _Open File or Project_ then choose `runtime/bindings/tflite/java/gragle.build`
+2. AndroidStudio should sync the project and setup gradlew uner `runtime/bindings/tflite/java`
3. Make the project using AndroidStudio or run the build directly in terminal:
```shell
./gradlew build
```
-This produces two libraries under `iree/bindings/tflite/java/build/outputs/aar`:
+This produces two libraries under `runtime/bindings/tflite/java/build/outputs/aar`:
* `iree-tflite-bindings-debug.aar`
* `iree-tflite-bindings-release.aar`
diff --git a/bindings/tflite/java/build.gradle b/runtime/bindings/tflite/java/build.gradle
similarity index 96%
rename from bindings/tflite/java/build.gradle
rename to runtime/bindings/tflite/java/build.gradle
index 09638f4..e38d78b 100644
--- a/bindings/tflite/java/build.gradle
+++ b/runtime/bindings/tflite/java/build.gradle
@@ -17,7 +17,7 @@
apply plugin: 'com.android.library'
-def cmakeListDir = "${rootDir}/../../.."
+def cmakeListDir = "${rootDir}/../../../.."
def hostBuildDir = "${cmakeListDir}/../iree-build-host"
def hostInstallDir = "${hostBuildDir}/install"
@@ -62,7 +62,7 @@
externalNativeBuild {
cmake {
version "3.13.4.0+"
- path "../../../CMakeLists.txt"
+ path "../../../../CMakeLists.txt"
}
}
}
diff --git a/bindings/tflite/java/org/tensorflow/lite/AndroidManifest.xml b/runtime/bindings/tflite/java/org/tensorflow/lite/AndroidManifest.xml
similarity index 100%
rename from bindings/tflite/java/org/tensorflow/lite/AndroidManifest.xml
rename to runtime/bindings/tflite/java/org/tensorflow/lite/AndroidManifest.xml
diff --git a/bindings/tflite/java/org/tensorflow/lite/CMakeLists.txt b/runtime/bindings/tflite/java/org/tensorflow/lite/CMakeLists.txt
similarity index 100%
rename from bindings/tflite/java/org/tensorflow/lite/CMakeLists.txt
rename to runtime/bindings/tflite/java/org/tensorflow/lite/CMakeLists.txt
diff --git a/bindings/tflite/java/org/tensorflow/lite/DataType.java b/runtime/bindings/tflite/java/org/tensorflow/lite/DataType.java
similarity index 100%
rename from bindings/tflite/java/org/tensorflow/lite/DataType.java
rename to runtime/bindings/tflite/java/org/tensorflow/lite/DataType.java
diff --git a/bindings/tflite/java/org/tensorflow/lite/Interpreter.java b/runtime/bindings/tflite/java/org/tensorflow/lite/Interpreter.java
similarity index 100%
rename from bindings/tflite/java/org/tensorflow/lite/Interpreter.java
rename to runtime/bindings/tflite/java/org/tensorflow/lite/Interpreter.java
diff --git a/bindings/tflite/java/org/tensorflow/lite/Tensor.java b/runtime/bindings/tflite/java/org/tensorflow/lite/Tensor.java
similarity index 100%
rename from bindings/tflite/java/org/tensorflow/lite/Tensor.java
rename to runtime/bindings/tflite/java/org/tensorflow/lite/Tensor.java
diff --git a/bindings/tflite/java/org/tensorflow/lite/TensorFlowLite.java b/runtime/bindings/tflite/java/org/tensorflow/lite/TensorFlowLite.java
similarity index 100%
rename from bindings/tflite/java/org/tensorflow/lite/TensorFlowLite.java
rename to runtime/bindings/tflite/java/org/tensorflow/lite/TensorFlowLite.java
diff --git a/bindings/tflite/java/org/tensorflow/lite/native/CMakeLists.txt b/runtime/bindings/tflite/java/org/tensorflow/lite/native/CMakeLists.txt
similarity index 93%
rename from bindings/tflite/java/org/tensorflow/lite/native/CMakeLists.txt
rename to runtime/bindings/tflite/java/org/tensorflow/lite/native/CMakeLists.txt
index 7494dcb..c1eb4c3 100644
--- a/bindings/tflite/java/org/tensorflow/lite/native/CMakeLists.txt
+++ b/runtime/bindings/tflite/java/org/tensorflow/lite/native/CMakeLists.txt
@@ -20,7 +20,7 @@
PUBLIC
iree::base
iree::base::logging
- bindings::tflite::shim
+ runtime::bindings::tflite::shim
)
target_link_options(${_NAME}
diff --git a/bindings/tflite/java/org/tensorflow/lite/native/interpreter_jni.cc b/runtime/bindings/tflite/java/org/tensorflow/lite/native/interpreter_jni.cc
similarity index 97%
rename from bindings/tflite/java/org/tensorflow/lite/native/interpreter_jni.cc
rename to runtime/bindings/tflite/java/org/tensorflow/lite/native/interpreter_jni.cc
index 4339c0c..e347fa8 100644
--- a/bindings/tflite/java/org/tensorflow/lite/native/interpreter_jni.cc
+++ b/runtime/bindings/tflite/java/org/tensorflow/lite/native/interpreter_jni.cc
@@ -10,7 +10,7 @@
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
#define JNI_FUNC extern "C" JNIEXPORT
#define JNI_PREFIX(METHOD) Java_org_tensorflow_lite_Interpreter_##METHOD
diff --git a/bindings/tflite/java/org/tensorflow/lite/native/tensor_jni.cc b/runtime/bindings/tflite/java/org/tensorflow/lite/native/tensor_jni.cc
similarity index 98%
rename from bindings/tflite/java/org/tensorflow/lite/native/tensor_jni.cc
rename to runtime/bindings/tflite/java/org/tensorflow/lite/native/tensor_jni.cc
index c385627..d193a0d 100644
--- a/bindings/tflite/java/org/tensorflow/lite/native/tensor_jni.cc
+++ b/runtime/bindings/tflite/java/org/tensorflow/lite/native/tensor_jni.cc
@@ -10,7 +10,7 @@
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
#define JNI_FUNC extern "C" JNIEXPORT
#define JNI_PREFIX(METHOD) Java_org_tensorflow_lite_Tensor_##METHOD
diff --git a/bindings/tflite/java/org/tensorflow/lite/native/tensorflow_lite_jni.cc b/runtime/bindings/tflite/java/org/tensorflow/lite/native/tensorflow_lite_jni.cc
similarity index 90%
rename from bindings/tflite/java/org/tensorflow/lite/native/tensorflow_lite_jni.cc
rename to runtime/bindings/tflite/java/org/tensorflow/lite/native/tensorflow_lite_jni.cc
index 50d8bf8..1d635ee 100644
--- a/bindings/tflite/java/org/tensorflow/lite/native/tensorflow_lite_jni.cc
+++ b/runtime/bindings/tflite/java/org/tensorflow/lite/native/tensorflow_lite_jni.cc
@@ -10,7 +10,7 @@
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
#define JNI_FUNC extern "C" JNIEXPORT
#define JNI_PREFIX(METHOD) Java_org_tensorflow_lite_TensorFlowLite_##METHOD
diff --git a/bindings/tflite/java/org/tensorflow/lite/tests/InterpreterTest.java b/runtime/bindings/tflite/java/org/tensorflow/lite/tests/InterpreterTest.java
similarity index 100%
rename from bindings/tflite/java/org/tensorflow/lite/tests/InterpreterTest.java
rename to runtime/bindings/tflite/java/org/tensorflow/lite/tests/InterpreterTest.java
diff --git a/bindings/tflite/java/org/tensorflow/lite/tests/TestManifest.xml b/runtime/bindings/tflite/java/org/tensorflow/lite/tests/TestManifest.xml
similarity index 100%
rename from bindings/tflite/java/org/tensorflow/lite/tests/TestManifest.xml
rename to runtime/bindings/tflite/java/org/tensorflow/lite/tests/TestManifest.xml
diff --git a/bindings/tflite/java/org/tensorflow/lite/tests/simple_add.mlir b/runtime/bindings/tflite/java/org/tensorflow/lite/tests/simple_add.mlir
similarity index 100%
rename from bindings/tflite/java/org/tensorflow/lite/tests/simple_add.mlir
rename to runtime/bindings/tflite/java/org/tensorflow/lite/tests/simple_add.mlir
diff --git a/bindings/tflite/java/settings.gradle b/runtime/bindings/tflite/java/settings.gradle
similarity index 100%
rename from bindings/tflite/java/settings.gradle
rename to runtime/bindings/tflite/java/settings.gradle
diff --git a/bindings/tflite/model.c b/runtime/bindings/tflite/model.c
similarity index 99%
rename from bindings/tflite/model.c
rename to runtime/bindings/tflite/model.c
index 2f141f1..32cd1fc 100644
--- a/bindings/tflite/model.c
+++ b/runtime/bindings/tflite/model.c
@@ -4,7 +4,7 @@
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#include "bindings/tflite/model.h"
+#include "runtime/bindings/tflite/model.h"
#include <stdio.h>
#include <string.h>
diff --git a/bindings/tflite/model.h b/runtime/bindings/tflite/model.h
similarity index 87%
rename from bindings/tflite/model.h
rename to runtime/bindings/tflite/model.h
index 3b1d8a7..9db6b43 100644
--- a/bindings/tflite/model.h
+++ b/runtime/bindings/tflite/model.h
@@ -13,8 +13,8 @@
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
-#include "bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
typedef struct _TfLiteModelExports {
iree_vm_function_t _reset_variables;
diff --git a/bindings/tflite/options.c b/runtime/bindings/tflite/options.c
similarity index 96%
rename from bindings/tflite/options.c
rename to runtime/bindings/tflite/options.c
index 4e5e49b..1061cbf 100644
--- a/bindings/tflite/options.c
+++ b/runtime/bindings/tflite/options.c
@@ -4,10 +4,10 @@
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#include "bindings/tflite/options.h"
+#include "runtime/bindings/tflite/options.h"
-#include "bindings/tflite/shim.h"
#include "iree/base/tracing.h"
+#include "runtime/bindings/tflite/shim.h"
void _TfLiteInterpreterOptionsSetDefaults(TfLiteInterpreterOptions* options) {
options->num_threads = -1;
diff --git a/bindings/tflite/options.h b/runtime/bindings/tflite/options.h
similarity index 84%
rename from bindings/tflite/options.h
rename to runtime/bindings/tflite/options.h
index dbd397f..627f02e 100644
--- a/bindings/tflite/options.h
+++ b/runtime/bindings/tflite/options.h
@@ -11,8 +11,8 @@
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
-#include "bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
struct TfLiteInterpreterOptions {
iree_allocator_t allocator;
diff --git a/bindings/tflite/shim.c b/runtime/bindings/tflite/shim.c
similarity index 76%
rename from bindings/tflite/shim.c
rename to runtime/bindings/tflite/shim.c
index d56dc1a..098472f 100644
--- a/bindings/tflite/shim.c
+++ b/runtime/bindings/tflite/shim.c
@@ -4,12 +4,12 @@
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#include "bindings/tflite/shim.h"
+#include "runtime/bindings/tflite/shim.h"
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
-#include "bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
TFL_CAPI_EXPORT extern const char* TfLiteVersion(void) { return "👻"; }
diff --git a/bindings/tflite/shim.h b/runtime/bindings/tflite/shim.h
similarity index 79%
rename from bindings/tflite/shim.h
rename to runtime/bindings/tflite/shim.h
index eebe4ef..84a1cf5 100644
--- a/bindings/tflite/shim.h
+++ b/runtime/bindings/tflite/shim.h
@@ -13,8 +13,8 @@
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
-#include "bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
TfLiteStatus _TfLiteStatusFromIREEStatus(iree_status_t status);
diff --git a/bindings/tflite/smoke_test.cc b/runtime/bindings/tflite/smoke_test.cc
similarity index 98%
rename from bindings/tflite/smoke_test.cc
rename to runtime/bindings/tflite/smoke_test.cc
index 835beff..6174753 100644
--- a/bindings/tflite/smoke_test.cc
+++ b/runtime/bindings/tflite/smoke_test.cc
@@ -29,16 +29,16 @@
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
// Test model is available both on the filesystem and here for embedding testing
// embedding the module directly in a binary.
-#include "bindings/tflite/testdata/add_dynamic_c.h"
+#include "runtime/bindings/tflite/testdata/add_dynamic_c.h"
#define IREE_BINDINGS_TFLITE_TESTDATA_ADD_DYNAMIC_EMBEDDED_DATA \
iree_tflite_testdata_add_dynamic_create()->data
#define IREE_BINDINGS_TFLITE_TESTDATA_ADD_DYNAMIC_EMBEDDED_SIZE \
iree_tflite_testdata_add_dynamic_create()->size
-#include "bindings/tflite/testdata/add_static_c.h"
+#include "runtime/bindings/tflite/testdata/add_static_c.h"
#define IREE_BINDINGS_TFLITE_TESTDATA_ADD_STATIC_EMBEDDED_DATA \
iree_tflite_testdata_add_static_create()->data
#define IREE_BINDINGS_TFLITE_TESTDATA_ADD_STATIC_EMBEDDED_SIZE \
diff --git a/bindings/tflite/tensor.c b/runtime/bindings/tflite/tensor.c
similarity index 98%
rename from bindings/tflite/tensor.c
rename to runtime/bindings/tflite/tensor.c
index 9debd88..a6891dc 100644
--- a/bindings/tflite/tensor.c
+++ b/runtime/bindings/tflite/tensor.c
@@ -4,10 +4,10 @@
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#include "bindings/tflite/tensor.h"
+#include "runtime/bindings/tflite/tensor.h"
-#include "bindings/tflite/shim.h"
#include "iree/base/tracing.h"
+#include "runtime/bindings/tflite/shim.h"
iree_status_t _TfLiteTensorParseNameAttr(TfLiteTensor* tensor,
iree_string_view_t attr,
diff --git a/bindings/tflite/tensor.h b/runtime/bindings/tflite/tensor.h
similarity index 94%
rename from bindings/tflite/tensor.h
rename to runtime/bindings/tflite/tensor.h
index 5115e63..6b41242 100644
--- a/bindings/tflite/tensor.h
+++ b/runtime/bindings/tflite/tensor.h
@@ -13,8 +13,8 @@
// NOTE: we pull in our own copy here in case the tflite API changes upstream.
#define TFL_COMPILE_LIBRARY 1 // force dllexport
-#include "bindings/tflite/include/tensorflow/lite/c/c_api.h"
-#include "bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api.h"
+#include "runtime/bindings/tflite/include/tensorflow/lite/c/c_api_experimental.h"
// This is the same value as TFLITE_RESHAPE_PARAMS_MAX_DIMENSION_COUNT.
// Since that's all tflite supports internally we are fairly safe to use that
diff --git a/bindings/tflite/testdata/BUILD b/runtime/bindings/tflite/testdata/BUILD
similarity index 100%
rename from bindings/tflite/testdata/BUILD
rename to runtime/bindings/tflite/testdata/BUILD
diff --git a/bindings/tflite/testdata/CMakeLists.txt b/runtime/bindings/tflite/testdata/CMakeLists.txt
similarity index 100%
rename from bindings/tflite/testdata/CMakeLists.txt
rename to runtime/bindings/tflite/testdata/CMakeLists.txt
diff --git a/bindings/tflite/testdata/add_dynamic.mlir b/runtime/bindings/tflite/testdata/add_dynamic.mlir
similarity index 100%
rename from bindings/tflite/testdata/add_dynamic.mlir
rename to runtime/bindings/tflite/testdata/add_dynamic.mlir
diff --git a/bindings/tflite/testdata/add_multi.mlir b/runtime/bindings/tflite/testdata/add_multi.mlir
similarity index 100%
rename from bindings/tflite/testdata/add_multi.mlir
rename to runtime/bindings/tflite/testdata/add_multi.mlir
diff --git a/bindings/tflite/testdata/add_static.mlir b/runtime/bindings/tflite/testdata/add_static.mlir
similarity index 100%
rename from bindings/tflite/testdata/add_static.mlir
rename to runtime/bindings/tflite/testdata/add_static.mlir