Skip to content

Commit

Permalink
removing usage of tflm_runtime and replacing usage with new runtime…
Browse files Browse the repository at this point in the history
… target target in g3 TFLM repo (#2375)

removing usage of `tflm_runtime` and replacing usage with new runtime target target in g3 TFLM repo

[g3 cl](https://critique.corp.google.com/cl/595884672)

BUG=[b/286456378](https://b.corp.google.com/issues/286456378)
  • Loading branch information
turbotoribio authored Jan 5, 2024
1 parent 276deb7 commit 95467d2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 28 deletions.
4 changes: 1 addition & 3 deletions tensorflow/lite/micro/examples/recipes/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ py_test(
],
deps = [
":resource_variables_lib",
# TODO(b/286456378): update tflm_runtime to runtime when we are ready to
# remove the alias.
"//tensorflow/lite/micro/python/interpreter/src:tflm_runtime",
"//python/tflite_micro:runtime",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
from tensorflow.python.platform import test
from tflite_micro.tensorflow.lite.micro.examples.recipes import resource_variables_lib

# TODO(b/286456378): change tflm_runtime to runtime when we all other usage has
# been updated.
from tflite_micro.tensorflow.lite.micro.python.interpreter.src import tflm_runtime
from tflite_micro.python.tflite_micro import runtime as tflm_runtime


class ResourceVariablesTest(test_util.TensorFlowTestCase):
Expand Down
18 changes: 0 additions & 18 deletions tensorflow/lite/micro/python/interpreter/src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,6 @@ package_group(
packages = tflm_python_op_resolver_friends(),
)

# tflm_runtime is deprecated, please use //python/tflite_micro:runtime instead.
# TODO(b/286456378): remove once all usage is changed to the runtime target.
py_library(
name = "tflm_runtime",
srcs = ["tflm_runtime.py"],
visibility = ["//visibility:public"],
deps = ["//python/tflite_micro:runtime"],
)

# runtime is deprecated, please use //python/tflite_micro:runtime instead.
# TODO(b/286456378): remove once all usage is changed to the runtime target.
py_library(
name = "runtime",
srcs = ["runtime.py"],
visibility = ["//visibility:public"],
deps = ["//python/tflite_micro:runtime"],
)

# TODO(b/286456378): remove once all internal usage is fixed.
cc_library(
name = "python_ops_resolver",
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/lite/micro/tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ py_library(
"@absl_py//absl/logging",
requirement("numpy"),
requirement("tensorflow-cpu"),
"//tensorflow/lite/micro/python/interpreter/src:runtime",
"//python/tflite_micro:runtime",
"//tensorflow/lite/tools:flatbuffer_utils",
],
)
Expand Down Expand Up @@ -208,7 +208,7 @@ py_binary(
"@absl_py//absl:app",
"@absl_py//absl/flags",
requirement("tensorflow-cpu"),
"//tensorflow/lite/micro/python/interpreter/src:runtime",
"//python/tflite_micro:runtime",
"//tensorflow/lite/tools:flatbuffer_utils",
],
)
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/tools/layer_by_layer_debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from tflite_micro.tensorflow.lite.tools import flatbuffer_utils
from tensorflow.python.platform import gfile
from tflite_micro.tensorflow.lite.micro.python.interpreter.src import runtime
from tflite_micro.python.tflite_micro import runtime
from tflite_micro.tensorflow.lite.micro.tools import layer_by_layer_schema_py_generated as layer_schema_fb
from tflite_micro.tensorflow.lite.micro.tools import model_transforms_utils

Expand Down
2 changes: 1 addition & 1 deletion tensorflow/lite/micro/tools/tflm_model_transforms_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

from tflite_micro.tensorflow.lite.tools import flatbuffer_utils
from tflite_micro.tensorflow.lite.micro.tools import model_transforms_utils
from tflite_micro.tensorflow.lite.micro.python.interpreter.src import runtime
from tflite_micro.python.tflite_micro import runtime


def _save_and_align_flatbuffer(model, model_path):
Expand Down

0 comments on commit 95467d2

Please sign in to comment.