Skip to content

Commit

Permalink
Revert changes for Remove lite/flex:delegate from pywrap_tensorflow_i…
Browse files Browse the repository at this point in the history
…nternal

Reverts 4f1f947

PiperOrigin-RevId: 670764187
  • Loading branch information
ecalubaquib authored and tensorflower-gardener committed Sep 4, 2024
1 parent dfc1365 commit d75c9f2
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 46 deletions.
18 changes: 1 addition & 17 deletions tensorflow/lite/python/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
load("@flatbuffers//:build_defs.bzl", "flatbuffer_py_library")
load("//tensorflow:pytype.default.bzl", "pytype_strict_contrib_test", "pytype_strict_library")
load("//tensorflow:strict.default.bzl", "py_strict_binary", "py_strict_library", "py_strict_test")
load("//tensorflow:tensorflow.default.bzl", "get_compatible_with_portable", "pybind_extension")
load("//tensorflow:tensorflow.default.bzl", "get_compatible_with_portable")
load("//tensorflow/lite:special_rules.bzl", "internal_visibility_allowlist")

package(
Expand Down Expand Up @@ -62,7 +62,6 @@ py_strict_test(
],
deps = [
":interpreter",
":pywrap_tflite",
#internal proto upb dep
"//third_party/py/numpy",
"//tensorflow:tensorflow_py",
Expand Down Expand Up @@ -180,16 +179,6 @@ py_strict_test(
],
)

pybind_extension(
name = "pywrap_tflite",
srcs = ["pywrap_tflite.cc"],
visibility = ["//visibility:public"],
deps = [
"//tensorflow/lite/delegates/flex:delegate",
"@pybind11",
],
)

py_strict_library(
name = "lite",
srcs = ["lite.py"],
Expand Down Expand Up @@ -263,7 +252,6 @@ py_strict_test(
":interpreter",
":lite",
":lite_constants",
":pywrap_tflite",
":schema_py",
":util",
#internal proto upb dep
Expand Down Expand Up @@ -313,7 +301,6 @@ py_strict_test(
":interpreter",
":lite",
":lite_v2_test_util",
":pywrap_tflite",
":schema_py",
":test_util",
":util",
Expand Down Expand Up @@ -354,7 +341,6 @@ py_strict_library(
deps = [
":interpreter",
":lite",
":pywrap_tflite",
"//tensorflow:tensorflow_py_no_contrib",
"//tensorflow/python/eager:def_function",
"//tensorflow/python/framework:constant_op",
Expand All @@ -380,7 +366,6 @@ py_strict_test(
":convert",
":interpreter",
":lite",
":pywrap_tflite",
":test_util",
#internal proto upb dep
"//third_party/py/numpy",
Expand Down Expand Up @@ -536,7 +521,6 @@ pytype_strict_contrib_test(
":convert",
":interpreter",
":op_hint",
":pywrap_tflite",
"//tensorflow/compiler/mlir/lite/metrics:converter_error_data_proto_py",
"//tensorflow/lite/python/metrics:metrics_wrapper",
"//tensorflow/lite/toco:toco_flags_proto_py",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/lite/python/optimize/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ py_strict_test(
"//third_party/py/numpy",
"//tensorflow:tensorflow_py_no_contrib",
"//tensorflow/lite/python:lite",
"//tensorflow/lite/python:pywrap_tflite",
"//tensorflow/lite/python:schema_py",
"//tensorflow/lite/tools:flatbuffer_utils",
"//tensorflow/python/framework:dtypes",
Expand Down
27 changes: 0 additions & 27 deletions tensorflow/lite/python/pywrap_tflite.cc

This file was deleted.

1 change: 1 addition & 0 deletions tensorflow/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,7 @@ pywrap_tensorflow_macro(
"//tensorflow/distribute/experimental/rpc/kernels:rpc_ops",
"//tensorflow/dtensor/cc:dtensor_device_cc",
"//tensorflow/dtensor/cc:tensor_layout",
"//tensorflow/lite/delegates/flex:delegate",
"//tensorflow/lite/kernels/shim:tf_kernel_shim",
"//tensorflow/lite/toco/python:toco_python_api",
"//tensorflow/python/client:tf_session_helper",
Expand Down
1 change: 0 additions & 1 deletion tensorflow/tools/pip_package/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ COMMON_PIP_DEPS = [
"//tensorflow/dtensor/python/tests:multi_client_test_util",
"//tensorflow/dtensor/python/tests:test_util",
"//tensorflow/lite/python:tflite_convert",
"//tensorflow/lite/python:pywrap_tflite",
"//tensorflow/lite/toco/python:toco_from_protos",
"//tensorflow/lite/tools:visualize",
"//tensorflow/python/autograph/core:test_lib",
Expand Down

0 comments on commit d75c9f2

Please sign in to comment.