//google/protobuf:wrappers_cc_proto appears to break kokoro tests when used
in the third_party/tensorflow directory. Refactor SW to remove this dependency
from //third_party/tensorflow/core/tpu/BUILD.

PiperOrigin-RevId: 398884585
Change-Id: If16387bb50bac6855bd30b61680245cab55c95fd
diff --git a/tensorflow/core/tpu/BUILD b/tensorflow/core/tpu/BUILD
index ee7414c..2abd421 100644
--- a/tensorflow/core/tpu/BUILD
+++ b/tensorflow/core/tpu/BUILD
@@ -32,7 +32,6 @@
     hdrs = ["tpu_embedding_optimization_parameters_utils.h"],
     visibility = ["//visibility:public"],
     deps = [
-        "//google/protobuf:wrappers_cc_proto",
         "//tensorflow/compiler/xla:xla_data_proto_cc",
         "//tensorflow/compiler/xla/service:hlo",
         "//tensorflow/compiler/xla/service:hlo_proto_cc",
diff --git a/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.cc b/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.cc
index 9815f05..b37d812 100644
--- a/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.cc
+++ b/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.cc
@@ -18,7 +18,6 @@
 #include <string>
 #include <utility>
 
-#include "google/protobuf/wrappers.pb.h"
 #include "tensorflow/compiler/xla/service/hlo.pb.h"
 #include "tensorflow/compiler/xla/service/hlo_opcode.h"
 #include "tensorflow/compiler/xla/xla_data.pb.h"
@@ -412,27 +411,6 @@
   };
 }
 
-bool NontrivialClippingLimits(const ClippingLimits& clipping_limits) {
-  return LowerClippingLimit(clipping_limits) !=
-             -std::numeric_limits<float>::infinity() ||
-         UpperClippingLimit(clipping_limits) !=
-             std::numeric_limits<float>::infinity();
-}
-
-float LowerClippingLimit(const ClippingLimits& clipping_limit) {
-  if (clipping_limit.has_lower()) {
-    return clipping_limit.lower().value();
-  }
-  return -std::numeric_limits<float>::infinity();
-}
-
-float UpperClippingLimit(const ClippingLimits& clipping_limit) {
-  if (clipping_limit.has_upper()) {
-    return clipping_limit.upper().value();
-  }
-  return std::numeric_limits<float>::infinity();
-}
-
 Status LoadOpShapeFunction::operator()(
     shape_inference::InferenceContext* c) const {
   int table_id;
diff --git a/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.h b/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.h
index 56c9bb3..afd4d9a 100644
--- a/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.h
+++ b/tensorflow/core/tpu/tpu_embedding_optimization_parameters_utils.h
@@ -96,15 +96,6 @@
   return absl::bit_cast<float, uint32>(1);
 }
 
-// Whether the clipping limits cover a limited range of floating point numbers.
-bool NontrivialClippingLimits(const ClippingLimits &clipping_limits);
-
-// Returns the value of the lower clipping limit
-float LowerClippingLimit(const ClippingLimits &clipping_limit);
-
-// Returns the value of the upper clipping limit
-float UpperClippingLimit(const ClippingLimits &clipping_limit);
-
 // Generic shape function for per-optimization-algorithm load ops.
 class LoadOpShapeFunction {
  public: