Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 632779657
  • Loading branch information
tensorflower-gardener committed May 11, 2024
1 parent 69e94a9 commit 43d662d
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 13 deletions.
21 changes: 18 additions & 3 deletions tensorflow/c/kernels/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tf_kernel_library(
"//tensorflow/c:tf_tensor",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"@com_google_absl//absl/log:check",
],
)

Expand All @@ -27,6 +28,7 @@ tf_kernel_library(
prefix = "summary_op",
deps = [
"//tensorflow/c:kernels",
"//tensorflow/c:tf_datatype_hdrs",
"//tensorflow/c:tf_status",
"//tensorflow/c:tf_tensor",
"//tensorflow/c/kernels:tensor_shape_utils",
Expand All @@ -41,7 +43,9 @@ tf_kernel_library(
name = "histogram_summary_op",
prefix = "histogram_summary_op",
deps = [
"//tensorflow/c:c_api_headers",
"//tensorflow/c:kernels",
"//tensorflow/c:tf_datatype_hdrs",
"//tensorflow/c:tf_status",
"//tensorflow/c:tf_tensor",
"//tensorflow/core:framework",
Expand Down Expand Up @@ -108,10 +112,16 @@ tf_cc_test(
deps = [
":bitcast_op",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:portable_gif_internal",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
"//tensorflow/core:test_main",
"//tensorflow/core:testlib",
"//tensorflow/core/platform:status",
"//tensorflow/core/platform:strcat",
"@local_tsl//tsl/platform:status",
"@local_tsl//tsl/protobuf:error_codes_proto_impl_cc",
],
)

Expand All @@ -120,13 +130,16 @@ tf_cc_test(
srcs = ["summary_op_test.cc"],
deps = [
":summary_op",
"//tensorflow/c:kernels",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
"//tensorflow/core:test_main",
"//tensorflow/core:testlib",
"//third_party/protobuf",
"@com_google_absl//absl/strings",
"@eigen_archive//:eigen3",
"@local_tsl//tsl/platform:status",
"@local_tsl//tsl/protobuf:error_codes_proto_impl_cc",
],
)

Expand All @@ -136,14 +149,15 @@ tf_cc_test(
srcs = ["summary_op_benchmark_test.cc"],
deps = [
":summary_op",
"//tensorflow/c:kernels",
"//tensorflow/core:core_cpu",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
"//tensorflow/core:test_main",
"//tensorflow/core:testlib",
"@com_google_benchmark//:benchmark",
"@local_tsl//tsl/platform:status",
],
)

Expand All @@ -166,6 +180,7 @@ tf_cc_test(
"//tensorflow/c:tf_tensor_internal",
"//tensorflow/core:framework",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
"//tensorflow/core:test",
"//tensorflow/core:test_main",
],
Expand Down
8 changes: 4 additions & 4 deletions tensorflow/c/kernels/bitcast_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ limitations under the License.

#include <sstream>

#include "absl/log/check.h"
#include "tensorflow/c/kernels.h"
#include "tensorflow/c/ops.h"
#include "tensorflow/c/tf_datatype.h"
#include "tensorflow/c/tf_status.h"
#include "tensorflow/c/tf_tensor.h"
#include "tensorflow/core/framework/common_shape_fns.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/registration/registration.h"
#include "tensorflow/core/framework/shape_inference.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/platform/macros.h"

// BitcastOp implements a bitcast kernel, creating an output tensor that shares
Expand Down
16 changes: 16 additions & 0 deletions tensorflow/c/kernels/bitcast_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,30 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/attr_value.pb.h"
#include "tensorflow/core/framework/attr_value_util.h"
#include "tensorflow/core/framework/device_base.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/node_def.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/framework/op_def_builder.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/framework/shape_inference.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/status.h"
#include "tensorflow/core/platform/strcat.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/types.h"
#include "tsl/platform/status.h"
#include "tsl/protobuf/error_codes.pb.h"

namespace tensorflow {
namespace {
Expand Down
5 changes: 4 additions & 1 deletion tensorflow/c/kernels/histogram_summary_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ limitations under the License.
#include <sstream>
#include <string>

#include "Eigen/Core" // from @eigen_archive
#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive
#include "tensorflow/c/c_api.h"
#include "tensorflow/c/kernels.h"
#include "tensorflow/c/tf_datatype.h"
#include "tensorflow/c/tf_status.h"
#include "tensorflow/c/tf_tensor.h"
#include "tensorflow/core/framework/registration/registration.h"
Expand All @@ -24,9 +27,9 @@ limitations under the License.
#include "tensorflow/core/platform/bfloat16.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/tstring.h"
#include "tensorflow/core/platform/types.h"
#include "tsl/platform/protobuf.h"

namespace {

Expand Down
1 change: 1 addition & 0 deletions tensorflow/c/kernels/merge_summary_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ limitations under the License.
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/tstring.h"
#include "tsl/platform/protobuf.h"

namespace {

Expand Down
4 changes: 3 additions & 1 deletion tensorflow/c/kernels/summary_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ limitations under the License.
#include <sstream>
#include <string>

#include "Eigen/Core" // from @eigen_archive
#include "unsupported/Eigen/CXX11/Tensor" // from @eigen_archive
#include "tensorflow/c/kernels.h"
#include "tensorflow/c/kernels/tensor_shape_utils.h"
#include "tensorflow/c/tf_datatype.h"
#include "tensorflow/c/tf_status.h"
#include "tensorflow/c/tf_tensor.h"
#include "tensorflow/core/framework/registration/registration.h"
Expand All @@ -28,10 +30,10 @@ limitations under the License.
#include "tensorflow/core/platform/bfloat16.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/strcat.h"
#include "tensorflow/core/platform/tstring.h"
#include "tensorflow/core/platform/types.h"
#include "tsl/platform/protobuf.h"

namespace {

Expand Down
10 changes: 8 additions & 2 deletions tensorflow/c/kernels/summary_op_benchmark_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ limitations under the License.

#include <string>

#include "benchmark/benchmark.h" // from @com_google_benchmark
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/node_builder.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/graph/testlib.h"
#include "tensorflow/core/platform/tstring.h"
#include "tsl/platform/status.h"
#include "tsl/platform/test_benchmark.h"

namespace tensorflow {
namespace {
Expand Down
9 changes: 8 additions & 1 deletion tensorflow/c/kernels/summary_op_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "tensorflow/c/kernels.h"
#include "absl/strings/match.h"
#include "Eigen/Core" // from @eigen_archive
#include "third_party/protobuf/text_format.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/attr_value.pb.h"
#include "tensorflow/core/framework/attr_value_util.h"
Expand All @@ -25,13 +27,18 @@ limitations under the License.
#include "tensorflow/core/framework/summary.pb.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/status.h"
#include "tensorflow/core/platform/strcat.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/tstring.h"
#include "tensorflow/core/platform/types.h"
#include "tensorflow/core/protobuf/error_codes.pb.h"
#include "tsl/platform/status.h"
#include "tsl/protobuf/error_codes.pb.h"

namespace tensorflow {
namespace {
Expand Down
3 changes: 2 additions & 1 deletion tensorflow/c/kernels/tensor_shape_utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ limitations under the License.

#include "tensorflow/c/kernels/tensor_shape_utils.h"

#include "tensorflow/c/tf_tensor.h"
#include "tensorflow/c/tf_tensor_internal.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor_shape.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/lib/core/status.h"
#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/types.h"

namespace tensorflow {

Expand Down

0 comments on commit 43d662d

Please sign in to comment.