aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow')
-rw-r--r--tensorflow/core/BUILD443
-rw-r--r--tensorflow/core/client/tensor_c_api_test.cc2
-rw-r--r--tensorflow/core/common_runtime/device_set_test.cc2
-rw-r--r--tensorflow/core/common_runtime/direct_session_test.cc2
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_allocator_retry_test.cc2
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc3
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h2
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_bfc_allocator_test.cc4
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc3
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h2
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_debug_allocator_test.cc5
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_device.cc6
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_device.h2
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_event_mgr.cc3
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_event_mgr.h2
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_event_mgr_test.cc5
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_init.cc3
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_region_allocator.cc2
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_region_allocator.h2
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_region_allocator_test.cc4
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_stream_util_test.cc2
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_util.cc5
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_util.h4
-rw-r--r--tensorflow/core/common_runtime/gpu/gpu_util_platform_specific.cc4
-rw-r--r--tensorflow/core/common_runtime/gpu/pool_allocator.h2
-rw-r--r--tensorflow/core/common_runtime/gpu/pool_allocator_test.cc5
-rw-r--r--tensorflow/core/common_runtime/gpu/process_state.cc2
-rw-r--r--tensorflow/core/common_runtime/session_test.cc2
-rw-r--r--tensorflow/core/common_runtime/simple_placer_test.cc2
-rw-r--r--tensorflow/core/framework/allocator_test.cc2
-rw-r--r--tensorflow/core/framework/attr_value_util_test.cc2
-rw-r--r--tensorflow/core/framework/bfloat16_test.cc2
-rw-r--r--tensorflow/core/framework/cancellation_test.cc2
-rw-r--r--tensorflow/core/framework/function_test.cc2
-rw-r--r--tensorflow/core/framework/kernel_def_builder_test.cc2
-rw-r--r--tensorflow/core/framework/node_def_builder_test.cc2
-rw-r--r--tensorflow/core/framework/node_def_util_test.cc2
-rw-r--r--tensorflow/core/framework/op_compatibility_test.cc4
-rw-r--r--tensorflow/core/framework/op_def_builder_test.cc2
-rw-r--r--tensorflow/core/framework/op_def_util_test.cc2
-rw-r--r--tensorflow/core/framework/op_kernel_test.cc2
-rw-r--r--tensorflow/core/framework/op_segment_test.cc2
-rw-r--r--tensorflow/core/framework/partial_tensor_shape_test.cc2
-rw-r--r--tensorflow/core/framework/rendezvous_test.cc1
-rw-r--r--tensorflow/core/framework/resource_mgr_test.cc2
-rw-r--r--tensorflow/core/framework/tensor_shape_test.cc2
-rw-r--r--tensorflow/core/framework/tensor_slice_test.cc2
-rw-r--r--tensorflow/core/framework/tensor_test.cc2
-rw-r--r--tensorflow/core/framework/tensor_testutil.h2
-rw-r--r--tensorflow/core/framework/tensor_util_test.cc2
-rw-r--r--tensorflow/core/framework/tracking_allocator_test.cc2
-rw-r--r--tensorflow/core/framework/types_test.cc2
-rw-r--r--tensorflow/core/framework/unique_tensor_references_test.cc2
-rw-r--r--tensorflow/core/graph/algorithm_test.cc2
-rw-r--r--tensorflow/core/graph/edgeset_test.cc2
-rw-r--r--tensorflow/core/graph/equal_graph_def_test.cc2
-rw-r--r--tensorflow/core/graph/graph_constructor_test.cc2
-rw-r--r--tensorflow/core/graph/graph_def_builder_test.cc2
-rw-r--r--tensorflow/core/graph/graph_partition_test.cc2
-rw-r--r--tensorflow/core/graph/graph_test.cc3
-rw-r--r--tensorflow/core/graph/node_builder_test.cc2
-rw-r--r--tensorflow/core/graph/optimizer_cse_test.cc2
-rw-r--r--tensorflow/core/graph/subgraph_test.cc2
-rw-r--r--tensorflow/core/graph/tensor_id_test.cc2
-rw-r--r--tensorflow/core/graph/validate_test.cc2
-rw-r--r--tensorflow/core/kernels/adjust_contrast_op_benchmark_test.cc4
-rw-r--r--tensorflow/core/kernels/adjust_contrast_op_test.cc2
-rw-r--r--tensorflow/core/kernels/batch_matmul_op.cc2
-rw-r--r--tensorflow/core/kernels/cast_op_test.cc4
-rw-r--r--tensorflow/core/kernels/check_numerics_op.cc2
-rw-r--r--tensorflow/core/kernels/colorspace_op_test.cc2
-rw-r--r--tensorflow/core/kernels/concat_op_test.cc2
-rw-r--r--tensorflow/core/kernels/control_flow_ops_test.cc2
-rw-r--r--tensorflow/core/kernels/conv_grad_ops.cc2
-rw-r--r--tensorflow/core/kernels/conv_ops.cc2
-rw-r--r--tensorflow/core/kernels/conv_ops_gpu.h8
-rw-r--r--tensorflow/core/kernels/core_ops_test.cc2
-rw-r--r--tensorflow/core/kernels/cwise_ops_test.cc4
-rw-r--r--tensorflow/core/kernels/dynamic_partition_op_test.cc2
-rw-r--r--tensorflow/core/kernels/dynamic_stitch_op_test.cc2
-rw-r--r--tensorflow/core/kernels/fft_ops.cc2
-rw-r--r--tensorflow/core/kernels/gather_op_test.cc2
-rw-r--r--tensorflow/core/kernels/identity_op_test.cc2
-rw-r--r--tensorflow/core/kernels/lrn_op_test.cc2
-rw-r--r--tensorflow/core/kernels/matmul_op.cc2
-rw-r--r--tensorflow/core/kernels/matmul_op_test.cc4
-rw-r--r--tensorflow/core/kernels/maxpooling_op.cc2
-rw-r--r--tensorflow/core/kernels/ops_testutil.h2
-rw-r--r--tensorflow/core/kernels/ops_util_test.cc2
-rw-r--r--tensorflow/core/kernels/pooling_ops_common.cc3
-rw-r--r--tensorflow/core/kernels/pooling_ops_common_gpu.h8
-rw-r--r--tensorflow/core/kernels/random_crop_op_test.cc2
-rw-r--r--tensorflow/core/kernels/random_op_test.cc2
-rw-r--r--tensorflow/core/kernels/range_sampler_test.cc1
-rw-r--r--tensorflow/core/kernels/reduction_ops_test.cc4
-rw-r--r--tensorflow/core/kernels/resize_bilinear_op_test.cc2
-rw-r--r--tensorflow/core/kernels/resize_nearest_neighbor_op_test.cc2
-rw-r--r--tensorflow/core/kernels/restore_op_test.cc1
-rw-r--r--tensorflow/core/kernels/reverse_op_test.cc1
-rw-r--r--tensorflow/core/kernels/save_op_test.cc1
-rw-r--r--tensorflow/core/kernels/scatter_op_test.cc2
-rw-r--r--tensorflow/core/kernels/segment_reduction_ops_test.cc2
-rw-r--r--tensorflow/core/kernels/slice_op_test.cc2
-rw-r--r--tensorflow/core/kernels/sparse_matmul_op_test.cc4
-rw-r--r--tensorflow/core/kernels/sparse_to_dense_op_test.cc2
-rw-r--r--tensorflow/core/kernels/summary_image_op_test.cc2
-rw-r--r--tensorflow/core/kernels/summary_op_test.cc2
-rw-r--r--tensorflow/core/kernels/training_ops_test.cc2
-rw-r--r--tensorflow/core/kernels/unique_op_test.cc2
-rw-r--r--tensorflow/core/kernels/xent_op_test.cc6
-rw-r--r--tensorflow/core/lib/core/arena_test.cc2
-rw-r--r--tensorflow/core/lib/core/bit_cast_test.cc2
-rw-r--r--tensorflow/core/lib/core/blocking_counter_test.cc2
-rw-r--r--tensorflow/core/lib/core/coding_test.cc2
-rw-r--r--tensorflow/core/lib/core/errors.h18
-rw-r--r--tensorflow/core/lib/core/notification_test.cc2
-rw-r--r--tensorflow/core/lib/core/refcount_test.cc2
-rw-r--r--tensorflow/core/lib/core/status_test.cc2
-rw-r--r--tensorflow/core/lib/core/status_test_util.h3
-rw-r--r--tensorflow/core/lib/core/threadpool_test.cc2
-rw-r--r--tensorflow/core/lib/gtl/array_slice_test.cc20
-rw-r--r--tensorflow/core/lib/gtl/edit_distance_test.cc2
-rw-r--r--tensorflow/core/lib/gtl/inlined_vector_test.cc2
-rw-r--r--tensorflow/core/lib/gtl/int_type_test.cc2
-rw-r--r--tensorflow/core/lib/gtl/iterator_range_test.cc2
-rw-r--r--tensorflow/core/lib/gtl/manual_constructor_test.cc2
-rw-r--r--tensorflow/core/lib/gtl/map_util_test.cc2
-rw-r--r--tensorflow/core/lib/gtl/top_n_test.cc2
-rw-r--r--tensorflow/core/lib/hash/crc32c_test.cc2
-rw-r--r--tensorflow/core/lib/hash/hash_test.cc2
-rw-r--r--tensorflow/core/lib/histogram/histogram_test.cc2
-rw-r--r--tensorflow/core/lib/io/inputbuffer_test.cc1
-rw-r--r--tensorflow/core/lib/io/match_test.cc3
-rw-r--r--tensorflow/core/lib/io/path_test.cc2
-rw-r--r--tensorflow/core/lib/io/recordio_test.cc4
-rw-r--r--tensorflow/core/lib/io/table_test.cc1
-rw-r--r--tensorflow/core/lib/jpeg/jpeg_handle.h8
-rw-r--r--tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc2
-rw-r--r--tensorflow/core/lib/png/png_io.cc4
-rw-r--r--tensorflow/core/lib/png/png_io.h2
-rw-r--r--tensorflow/core/lib/random/distribution_sampler_test.cc1
-rw-r--r--tensorflow/core/lib/random/philox_random_test.cc2
-rw-r--r--tensorflow/core/lib/random/random_distributions_test.cc2
-rw-r--r--tensorflow/core/lib/random/random_test.cc2
-rw-r--r--tensorflow/core/lib/random/simple_philox_test.cc2
-rw-r--r--tensorflow/core/lib/random/weighted_picker_test.cc1
-rw-r--r--tensorflow/core/lib/strings/numbers_test.cc2
-rw-r--r--tensorflow/core/lib/strings/ordered_code_test.cc2
-rw-r--r--tensorflow/core/lib/strings/str_util_test.cc2
-rw-r--r--tensorflow/core/lib/strings/strcat_test.cc2
-rw-r--r--tensorflow/core/lib/strings/stringprintf_test.cc2
-rw-r--r--tensorflow/core/ops/io_ops.cc1
-rw-r--r--tensorflow/core/platform/cuda.h (renamed from tensorflow/core/platform/stream_executor_util.h)12
-rw-r--r--tensorflow/core/platform/default/build_config.bzl3
-rw-r--r--tensorflow/core/platform/default/stream_executor.h (renamed from tensorflow/core/platform/default/stream_executor_util.h)22
-rw-r--r--tensorflow/core/platform/env_test.cc1
-rw-r--r--tensorflow/core/platform/integral_types_test.cc2
-rw-r--r--tensorflow/core/platform/jpeg.h35
-rw-r--r--tensorflow/core/platform/logging.h2
-rw-r--r--tensorflow/core/platform/logging_test.cc2
-rw-r--r--tensorflow/core/platform/mem.h2
-rw-r--r--tensorflow/core/platform/png.h30
-rw-r--r--tensorflow/core/platform/port_test.cc2
-rw-r--r--tensorflow/core/platform/protobuf.h8
-rw-r--r--tensorflow/core/platform/regexp.h5
-rw-r--r--tensorflow/core/platform/stream_executor.h27
-rw-r--r--tensorflow/core/platform/tensor_coding.h1
-rw-r--r--tensorflow/core/platform/test.cc3
-rw-r--r--tensorflow/core/platform/test.h7
-rw-r--r--tensorflow/core/platform/test_benchmark.h3
-rw-r--r--tensorflow/core/platform/test_main.cc9
-rw-r--r--tensorflow/core/platform/thread_annotations.h2
-rw-r--r--tensorflow/core/platform/tracing.h1
-rw-r--r--tensorflow/core/platform/types.h2
-rw-r--r--tensorflow/core/util/bcast_test.cc2
-rw-r--r--tensorflow/core/util/device_name_utils_test.cc2
-rw-r--r--tensorflow/core/util/saved_tensor_slice_util_test.cc2
-rw-r--r--tensorflow/core/util/sparse/sparse_tensor_test.cc2
-rw-r--r--tensorflow/core/util/tensor_slice_reader_test.cc1
-rw-r--r--tensorflow/core/util/tensor_slice_set_test.cc2
-rw-r--r--tensorflow/core/util/tensor_slice_util_test.cc2
-rw-r--r--tensorflow/core/util/tensor_slice_writer_test.cc1
-rw-r--r--tensorflow/core/util/work_sharder_test.cc2
183 files changed, 651 insertions, 387 deletions
diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD
index 3fb0567e05..b998e8d6ff 100644
--- a/tensorflow/core/BUILD
+++ b/tensorflow/core/BUILD
@@ -1,6 +1,47 @@
# Description:
# TensorFlow is a computational framework, primarily for use in machine
# learning applications.
+#
+# Public targets:
+#
+# ":protos_all" - exports all core TensorFlow protos
+# ":protos_all_py_pb2" - py_proto_library version
+# ":lib" - exports the public non-test headers for:
+# platform/: Platform-specific code and external dependencies
+# lib/: Low-level libraries that are not TensorFlow-specific
+# ":test" and ":test_main" - test equivalent of ":lib".
+# This is currently public, but may be made internal in the
+# future. Try to avoid depending on it.
+# ":framework" - exports the public non-test headers for:
+# util/: General low-level TensorFlow-specific libraries
+# framework/: Support for adding new ops & kernels
+# ":ops" - defines TensorFlow ops, but no implementations / kernels
+# ops/: Standard ops
+# user_ops/: User-supplied ops
+# This aggregates a number of smaller op libraries (":*_op_lib")
+# ":core_cpu" - exports the public non-test headers for:
+# graph/: Support for graphs made up of ops
+# common_runtime/: Common code for execution of graphs
+# public/: Public APIs for running graphs
+# ":core" - The code for ":core_cpu" plus a GPU runtime
+# ":gpu_kernels" - The gpu-specific kernels
+# ":kernels" - The cpu-specific kernels, plus ":gpu_kernels" if built with Cuda
+# ":tensorflow_opensource" - The complete open-source package, including
+# ":kernels", ":core", and a Session implementation.
+# ":tensorflow" - "tensorflow_opensource" plus some Google-internal libraries.
+# ":testlib" - TensorFlow-specific test support, e.g. utilities for testing
+# kernels.
+#
+# Public Android targets:
+#
+# filegroup ":android_proto_srcs" - Protos
+# filegroup ":android_srcs" - Core sources
+# filegroup ":android_core_ops" - Essential kernels
+# filegroup ":android_extended_ops" - Optional kernels
+# cc_library ":android_tensorflow_lib" - Native library
+# portable_proto_library ":android_proto_lib"
+
+# TODO(josh11b): Reorder the rules in this file to match the above.
package(default_visibility = ["//tensorflow:internal"])
@@ -21,6 +62,7 @@ load(
"/tensorflow/core/platform/default/build_config",
"tf_proto_library",
"tf_additional_lib_srcs",
+ "tf_additional_stream_executor_srcs",
"tf_additional_test_srcs",
"tf_kernel_tests_linkstatic",
)
@@ -30,109 +72,229 @@ load(
)
cc_library(
- name = "lib",
+ name = "lib_internal",
srcs = glob(
[
"lib/**/*.h",
"lib/**/*.cc",
"platform/*.h",
"platform/*.cc",
- "public/*.h",
+ "public/env.h", # TODO(josh11b): move to platform/
+ "public/status.h", # TODO(josh11b): move to lib/core/
] + tf_additional_lib_srcs(),
exclude = [
"**/*test*",
+ "platform/**/cuda.h",
+ "platform/**/stream_executor.h",
],
),
hdrs = [
- "framework/allocator.h",
- "framework/bfloat16.h",
- "framework/numeric_types.h",
- "framework/tensor_types.h",
- "framework/types.h",
+ "lib/core/blocking_counter.h",
+ "lib/core/refcount.h",
+ "lib/gtl/edit_distance.h",
+ "lib/gtl/int_type.h",
+ "lib/gtl/iterator_range.h",
+ "lib/gtl/top_n.h",
+ "lib/io/iterator.h",
+ "lib/io/match.h",
+ "lib/jpeg/jpeg_handle.h",
+ "lib/png/png_io.h",
+ "lib/random/random.h",
+ "lib/random/random_distributions.h",
+ "lib/random/weighted_picker.h",
+ "lib/strings/ordered_code.h",
+ "lib/strings/regexp.h",
+ "platform/platform.h",
+ "platform/tensor_coding.h",
+ "platform/tracing.h",
+ ],
+ copts = tf_copts(),
+ linkopts = ["-ldl"],
+ deps = [
+ ":protos_all",
+ "//tensorflow/core/platform/default/build_config:platformlib",
+ ],
+)
+
+cc_library(
+ name = "lib_test_internal",
+ testonly = 1,
+ hdrs = [
+ "lib/gtl/manual_constructor.h",
+ "lib/io/block.h",
+ "lib/io/block_builder.h",
+ "lib/io/format.h",
+ "lib/random/philox_random_test_utils.h",
+ "platform/snappy.h",
+ ],
+ deps = [":lib_internal"],
+)
+
+cc_library(
+ name = "lib",
+ hdrs = [
+ # TODO(josh11b): Make many of these internal.
"lib/core/arena.h",
"lib/core/bits.h",
- "lib/core/blocking_counter.h",
"lib/core/casts.h",
"lib/core/coding.h",
- "lib/core/command_line_flags.h",
+ "lib/core/command_line_flags.h", # TODO(vrv): Delete.
"lib/core/errors.h",
"lib/core/notification.h",
- "lib/core/refcount.h",
"lib/core/stringpiece.h",
"lib/core/threadpool.h",
"lib/gtl/array_slice.h",
- "lib/gtl/edit_distance.h",
"lib/gtl/inlined_vector.h",
- "lib/gtl/int_type.h",
- "lib/gtl/iterator_range.h",
- "lib/gtl/map_util.h",
- "lib/gtl/stl_util.h",
- "lib/gtl/top_n.h",
- "lib/hash/crc32c.h",
- "lib/hash/hash.h",
+ "lib/gtl/map_util.h", # TODO(josh11b): make internal
+ "lib/gtl/stl_util.h", # TODO(josh11b): make internal
+ "lib/hash/crc32c.h", # TODO(josh11b): make internal
+ "lib/hash/hash.h", # TODO(josh11b): make internal
"lib/histogram/histogram.h",
- "lib/io/inputbuffer.h",
- "lib/io/iterator.h",
- "lib/io/match.h",
+ "lib/io/inputbuffer.h", # TODO(josh11b): make internal
"lib/io/path.h",
"lib/io/record_reader.h",
"lib/io/record_writer.h",
"lib/io/table.h",
"lib/io/table_builder.h",
"lib/io/table_options.h",
- "lib/jpeg/jpeg_handle.h",
"lib/jpeg/jpeg_mem.h",
"lib/random/distribution_sampler.h",
"lib/random/philox_random.h",
- "lib/random/random.h",
- "lib/random/random_distributions.h",
- "lib/random/simple_philox.h",
- "lib/random/weighted_picker.h",
- "lib/strings/numbers.h",
- "lib/strings/ordered_code.h",
- "lib/strings/str_util.h",
+ "lib/random/simple_philox.h", # TODO(josh11b): make internal
+ "lib/strings/numbers.h", # TODO(josh11b): make internal
+ "lib/strings/str_util.h", # TODO(josh11b): make internal
"lib/strings/strcat.h",
"lib/strings/stringprintf.h",
- "platform/host_info.h",
+ "platform/host_info.h", # TODO(josh11b): make internal
"platform/init_main.h",
"platform/logging.h",
"platform/macros.h",
"platform/mem.h",
"platform/mutex.h",
- "platform/port.h",
- "platform/protobuf.h",
+ "platform/port.h", # TODO(josh11b): delete
+ "platform/protobuf.h", # TODO(josh11b): make internal
"platform/regexp.h",
- "platform/stream_executor_util.h",
- "platform/tensor_coding.h",
"platform/thread_annotations.h",
- "platform/tracing.h",
"platform/types.h",
- "public/env.h",
- "public/session.h",
- "public/session_options.h",
- "public/status.h",
- "public/tensor.h",
- "public/tensor_c_api.h",
- "public/tensor_shape.h",
+ "public/env.h", # TODO(josh11b): move to platform/
+ "public/status.h", # TODO(josh11b): move to lib/core/
+ ],
+ visibility = ["//visibility:public"],
+ deps = [":lib_internal"],
+)
+
+tf_cuda_library(
+ name = "framework_internal",
+ srcs = glob(
+ [
+ "framework/**/*.h",
+ "framework/**/*.cc",
+ "util/**/*.h",
+ "util/**/*.cc",
+ # TODO(josh11b): Move these from public/ to framework/
+ "public/partial_tensor_shape.h",
+ "public/tensor.h",
+ "public/tensor_shape.h",
+ ],
+ exclude = [
+ "**/*test*",
+ "**/*main.cc",
+ "framework/fake_input.*",
+ ],
+ ),
+ hdrs = [
+ "framework/graph_def_util.h",
+ "framework/op_segment.h",
+ "framework/rendezvous.h", # only needed for tests
+ "framework/tensor_reference.h",
+ "framework/tracking_allocator.h", # only needed for tests
+ "framework/unique_tensor_references.h",
+ "util/tensor_slice_set.h",
+ "util/tensor_slice_util.h",
],
copts = tf_copts(),
linkopts = ["-ldl"],
- visibility = ["//visibility:public"],
deps = [
- ":protos_cc",
- "//tensorflow/core/platform/default/build_config:platformlib",
+ ":lib",
+ ":lib_internal",
+ ":protos_all",
+ "//third_party/eigen3",
],
+ alwayslink = 1,
)
tf_cuda_library(
- name = "core_cpu",
+ name = "framework",
+ hdrs = [
+ "framework/allocator.h",
+ "framework/attr_value_util.h",
+ "framework/bfloat16.h",
+ "framework/cancellation.h",
+ "framework/control_flow.h", # TODO(josh11b): Make internal?
+ "framework/device_base.h",
+ "framework/function.h",
+ "framework/node_def_builder.h",
+ "framework/kernel_def_builder.h",
+ "framework/lookup_interface.h",
+ "framework/node_def_util.h",
+ "framework/numeric_op.h",
+ "framework/numeric_types.h",
+ "framework/op.h",
+ "framework/op_def_builder.h",
+ "framework/op_def_util.h",
+ "framework/op_gen_lib.h",
+ "framework/op_kernel.h",
+ "framework/queue_interface.h",
+ "framework/reader_interface.h",
+ "framework/reader_op_kernel.h",
+ "framework/register_types.h",
+ "framework/resource_mgr.h",
+ "framework/tensor_slice.h",
+ "framework/tensor_types.h",
+ "framework/tensor_util.h",
+ "framework/type_traits.h",
+ "framework/type_index.h",
+ "framework/types.h",
+ # TODO(josh11b): Move these from public/ to framework/
+ "public/partial_tensor_shape.h",
+ "public/tensor.h",
+ "public/tensor_shape.h",
+ # NOTE(josh11b): Will stay in public/
+ "public/version.h",
+ "util/bcast.h",
+ "util/cuda_kernel_helper.h",
+ "util/device_name_utils.h",
+ "util/events_writer.h",
+ "util/guarded_philox_random.h",
+ "util/padding.h",
+ "util/port.h",
+ "util/saved_tensor_slice_util.h",
+ "util/sparse/group_iterator.h",
+ "util/sparse/sparse_tensor.h",
+ "util/tensor_slice_reader_cache.h",
+ "util/tensor_slice_reader.h",
+ "util/tensor_slice_writer.h",
+ "util/use_cudnn.h",
+ "util/util.h",
+ "util/work_sharder.h",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [":framework_internal"],
+)
+
+tf_cuda_library(
+ name = "core_cpu_internal",
srcs = glob(
[
- "common_runtime/**/*.h",
"client/**/*.cc",
+ "common_runtime/**/*.h",
"common_runtime/**/*.cc",
"graph/**/*.h",
"graph/**/*.cc",
+ "public/session.h",
+ "public/session_options.h",
+ "public/tensor_c_api.h",
+ "public/version.h",
],
exclude = [
"**/*test*",
@@ -144,66 +306,65 @@ tf_cuda_library(
"common_runtime/direct_session.h",
],
),
- hdrs = glob(["public/**/*.h"]),
+ hdrs = glob(
+ [
+ "common_runtime/**/*.h",
+ "graph/**/*.h",
+ ],
+ exclude = [
+ "**/*test*",
+ "common_runtime/direct_session.h",
+ ],
+ ),
copts = tf_copts(),
- visibility = ["//visibility:public"],
deps = [
":copy_tensor",
":framework",
+ ":framework_internal",
":lib",
- ":protos_cc",
+ ":lib_internal",
+ ":protos_all",
"//third_party/eigen3",
],
alwayslink = 1,
)
tf_cuda_library(
- name = "framework",
- srcs = glob(
- [
- "framework/**/*.h",
- "framework/**/*.cc",
- "util/**/*.h",
- "util/**/*.cc",
- ],
- exclude = [
- "**/*test*",
- "**/*main.cc",
- ],
- ),
- hdrs = glob([
- "public/**/*.h",
- "util/device_name_utils.h",
- ]) + [
- "framework/op.h",
- "framework/op_kernel.h",
- "framework/reader_op_kernel.h",
+ name = "core_cpu",
+ hdrs = [
+ "common_runtime/device.h",
+ "graph/algorithm.h",
+ "graph/default_device.h",
+ "graph/graph.h",
+ "graph/graph_constructor.h",
+ "graph/graph_def_builder.h",
+ "graph/node_builder.h",
+ "public/session.h",
+ "public/session_options.h",
+ "public/tensor_c_api.h",
],
- copts = tf_copts(),
- linkopts = ["-ldl"],
visibility = ["//visibility:public"],
deps = [
- ":lib",
- ":protos_cc",
- "//third_party/eigen3",
+ ":core_cpu_internal",
],
- alwayslink = 1,
)
tf_cuda_library(
name = "direct_session",
- srcs = [
- "common_runtime/direct_session.cc",
- "common_runtime/direct_session.h",
- ],
+ srcs = ["common_runtime/direct_session.cc"],
+ hdrs = ["common_runtime/direct_session.h"],
copts = tf_copts(),
cuda_deps = [
":cuda",
],
linkstatic = 1,
deps = [
- ":core",
+ ":core_cpu_internal",
+ ":framework",
+ ":framework_internal",
":lib",
+ ":lib_internal",
+ ":protos_all",
],
alwayslink = 1,
)
@@ -237,35 +398,49 @@ tf_cuda_library(
linkstatic = 1,
deps = [
":core_cpu",
+ ":core_cpu_internal",
+ ":framework",
+ ":framework_internal",
":lib",
- ":protos_cc",
+ ":lib_internal",
+ ":protos_all",
":stream_executor",
"//third_party/eigen3",
],
alwayslink = 1,
)
-# Test support library needed for higher-level tests
+# Test support library needed for higher-level (TensorFlow-specific) tests
cc_library(
name = "testlib",
testonly = 1,
srcs = [
"common_runtime/kernel_benchmark_testlib.cc",
- "common_runtime/kernel_benchmark_testlib.h",
+ "framework/fake_input.cc",
"framework/function_testlib.cc",
"framework/tensor_testutil.cc",
"graph/testlib.cc",
+ "kernels/ops_testutil.cc",
],
hdrs = [
+ "common_runtime/kernel_benchmark_testlib.h",
+ "framework/fake_input.h",
"framework/function_testlib.h",
"framework/tensor_testutil.h",
"graph/testlib.h",
+ "kernels/ops_testutil.h",
],
copts = tf_copts(),
visibility = ["//visibility:public"],
deps = [
":core_cpu",
- ":tensorflow",
+ ":core_cpu_internal",
+ ":framework",
+ ":framework_internal",
+ ":kernels",
+ ":lib",
+ ":protos_all",
+ ":tensorflow", # TODO(josh11b): Drop this dep?
":test",
"//tensorflow/core/platform/default/build_config:gtest",
],
@@ -303,7 +478,7 @@ tf_cuda_library(
linkstatic = 1,
visibility = ["//visibility:public"],
deps = [
- ":core",
+ ":framework",
":lib",
":protos_cc",
"//tensorflow/models/embedding:word2vec_ops",
@@ -314,20 +489,18 @@ tf_cuda_library(
tf_cuda_library(
name = "kernels",
+ # TODO(josh11b): Pull common dependencies out into a separate library.
srcs = glob(
[
- "kernels/**/*.h",
"kernels/**/*.cc",
],
exclude = [
- "**/*test*",
- "**/*main.cc",
+ "kernels/**/*test*",
+ "kernels/**/*main.cc",
"kernels/**/*.cu.cc",
],
),
- hdrs = [
- "kernels/reader_base.h",
- ],
+ hdrs = glob(["kernels/**/*.h"]),
copts = tf_copts(),
cuda_deps = [
":gpu_kernels",
@@ -335,14 +508,16 @@ tf_cuda_library(
linkstatic = 0,
visibility = ["//visibility:public"],
deps = [
- ":core",
+ ":core_cpu",
+ ":framework",
+ ":framework_internal",
":lib",
+ ":lib_internal",
":ops",
- ":protos_cc",
+ ":protos_all",
":stream_executor",
"//tensorflow/models/embedding:word2vec_kernels",
"//third_party/eigen3",
- "//third_party/gemmlowp:eight_bit_int_gemm",
],
alwayslink = 1,
)
@@ -361,11 +536,16 @@ tf_gpu_kernel_library(
deps = [
":cuda",
":framework",
+ ":framework_internal",
+ ":lib",
+ ":lib_internal",
"//third_party/eigen3",
],
)
# Test support library needed for all tests
+# This is currently public, but may be made internal in the
+# future. Try to avoid depending on it.
cc_library(
name = "test",
testonly = 1,
@@ -382,11 +562,14 @@ cc_library(
visibility = ["//visibility:public"],
deps = [
":lib",
+ ":lib_internal",
"//tensorflow/core/platform/default/build_config:gtest",
],
)
# Main program for tests
+# This is currently public, but may be made internal in the
+# future. Try to avoid depending on it.
cc_library(
name = "test_main",
testonly = 1,
@@ -394,6 +577,8 @@ cc_library(
copts = tf_copts(),
linkopts = ["-lm"],
deps = [
+ ":lib",
+ ":lib_internal",
":test",
"//tensorflow/core/platform/default/build_config:test_main",
],
@@ -409,6 +594,7 @@ tf_proto_library(
visibility = ["//visibility:public"],
)
+# TODO(josh11b): Is this needed, or can we just use ":protos_all"?
cc_library(
name = "protos_cc",
deps = ["//tensorflow/core/platform/default/build_config:protos_cc"],
@@ -453,12 +639,6 @@ cc_library(
alwayslink = 1,
)
-# This is to workaround strict header checks
-cc_library(
- name = "strict_headers",
- hdrs = glob(["**/*.h"]),
-)
-
# Low level library tests
tf_cc_tests(
tests = glob(
@@ -470,7 +650,10 @@ tf_cc_tests(
),
deps = [
":lib",
- ":strict_headers",
+ ":lib_internal",
+ ":lib_test_internal",
+ ":protos_all",
+ ":test",
":test_main",
],
)
@@ -481,6 +664,8 @@ cc_test(
data = glob(["lib/jpeg/testdata/*.jpg"]),
deps = [
":lib",
+ ":lib_internal",
+ ":test",
":test_main",
],
)
@@ -491,6 +676,8 @@ cc_test(
copts = ["$(STACK_FRAME_UNLIMITED)"], # Tests initialize large vectors
deps = [
":lib",
+ ":lib_internal",
+ ":test",
":test_main",
],
)
@@ -516,14 +703,21 @@ tf_cc_tests(
),
deps = [
":core",
+ ":core_cpu",
+ ":core_cpu_internal",
":direct_session",
+ ":framework",
+ ":framework_internal",
":kernels",
":lib",
+ ":lib_internal",
":ops",
- ":strict_headers",
+ ":protos_all",
+ ":test",
":test_main",
":testlib",
"//tensorflow/cc:cc_ops",
+ "//third_party/eigen3",
],
)
@@ -539,9 +733,16 @@ tf_cc_tests(
],
),
deps = [
+ ":core_cpu",
+ ":core_cpu_internal",
":direct_session",
+ ":framework",
+ ":framework_internal",
":kernels",
- ":strict_headers",
+ ":lib",
+ ":lib_internal",
+ ":protos_all",
+ ":test",
":test_main",
":testlib",
"//tensorflow/cc:cc_ops",
@@ -550,6 +751,11 @@ tf_cc_tests(
tf_cuda_library(
name = "stream_executor",
+ srcs = tf_additional_stream_executor_srcs(),
+ hdrs = [
+ "platform/cuda.h",
+ "platform/stream_executor.h",
+ ],
deps = [
"//tensorflow/core/platform/default/build_config:stream_executor",
],
@@ -557,10 +763,6 @@ tf_cuda_library(
cc_library(
name = "cuda",
- visibility = [
- ":friends",
- "//tensorflow:internal",
- ],
deps = [
"//tensorflow/core/platform/default/build_config:cuda",
],
@@ -570,34 +772,13 @@ cc_library(
name = "tensorflow",
visibility = ["//visibility:public"],
deps = [
- "tensorflow_opensource",
+ ":tensorflow_opensource",
"//tensorflow/core/platform/default/build_config:tensorflow_platform_specific",
],
)
cc_library(
name = "core",
- hdrs = [
- "lib/core/coding.h",
- "lib/core/errors.h",
- "lib/gtl/array_slice.h",
- "lib/hash/crc32c.h",
- "lib/histogram/histogram.h",
- "lib/io/record_reader.h",
- "lib/jpeg/jpeg_mem.h",
- "lib/png/png_io.h",
- "lib/strings/str_util.h",
- "lib/strings/strcat.h",
- "platform/host_info.h",
- "platform/init_main.h",
- "platform/logging.h",
- "platform/macros.h",
- "platform/mem.h",
- "platform/mutex.h",
- "platform/port.h",
- "platform/protobuf.h",
- "platform/types.h",
- ],
visibility = ["//visibility:public"],
deps = [
":core_cpu",
@@ -663,7 +844,7 @@ filegroup(
"platform/google/integral_types.h",
"platform/google/mutex.h",
"platform/google/protobuf.h",
- "platform/google/stream_executor_util.h",
+ "platform/google/stream_executor.h",
"platform/google/tracing_impl.h",
"platform/google/*.cc",
"platform/google/test_benchmark.cc",
diff --git a/tensorflow/core/client/tensor_c_api_test.cc b/tensorflow/core/client/tensor_c_api_test.cc
index ec92d559cb..321802bde0 100644
--- a/tensorflow/core/client/tensor_c_api_test.cc
+++ b/tensorflow/core/client/tensor_c_api_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/public/tensor_c_api.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
using tensorflow::Tensor;
diff --git a/tensorflow/core/common_runtime/device_set_test.cc b/tensorflow/core/common_runtime/device_set_test.cc
index bcd9636042..f3a1db40f2 100644
--- a/tensorflow/core/common_runtime/device_set_test.cc
+++ b/tensorflow/core/common_runtime/device_set_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/common_runtime/device_set.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/status.h"
namespace tensorflow {
diff --git a/tensorflow/core/common_runtime/direct_session_test.cc b/tensorflow/core/common_runtime/direct_session_test.cc
index 4c67177af6..b90b9fae38 100644
--- a/tensorflow/core/common_runtime/direct_session_test.cc
+++ b/tensorflow/core/common_runtime/direct_session_test.cc
@@ -20,7 +20,6 @@ limitations under the License.
#include <unordered_map>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/tensor_testutil.h"
@@ -31,6 +30,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/core/threadpool.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/session_options.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/common_runtime/gpu/gpu_allocator_retry_test.cc b/tensorflow/core/common_runtime/gpu/gpu_allocator_retry_test.cc
index 2ff29979e8..6c3a50813b 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_allocator_retry_test.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_allocator_retry_test.cc
@@ -15,11 +15,11 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/thread_annotations.h"
#include "tensorflow/core/public/env.h"
diff --git a/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc b/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc
index 9caf6e7f23..cd82361030 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc
@@ -15,8 +15,6 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h"
-#include "perftools/gputools/executor/multi_platform_manager.h"
-#include "perftools/gputools/executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/lib/core/bits.h"
@@ -27,6 +25,7 @@ limitations under the License.
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
namespace gpu = ::perftools::gputools;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h b/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h
index 0971f21576..5551c8bdb7 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h
+++ b/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h
@@ -21,7 +21,6 @@ limitations under the License.
#include <unordered_map>
#include <vector>
-#include "perftools/gputools/executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h"
#include "tensorflow/core/common_runtime/gpu/visitable_allocator.h"
#include "tensorflow/core/lib/gtl/stl_util.h"
@@ -29,6 +28,7 @@ limitations under the License.
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
#include "tensorflow/core/platform/thread_annotations.h"
namespace tensorflow {
diff --git a/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator_test.cc b/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator_test.cc
index c7904e64d4..c52d15ca58 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator_test.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_bfc_allocator_test.cc
@@ -20,13 +20,13 @@ limitations under the License.
#include <algorithm>
#include <vector>
-#include "perftools/gputools/executor/stream_executor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
+#include "tensorflow/core/platform/test.h"
namespace gpu = ::perftools::gputools;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc b/tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc
index 1c8183e0c2..57f690fe0c 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_debug_allocator.cc
@@ -15,9 +15,8 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h"
-#include "perftools/gputools/executor/multi_platform_manager.h"
-#include "perftools/gputools/executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
+#include "tensorflow/core/platform/stream_executor.h"
namespace gpu = ::perftools::gputools;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h b/tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h
index 4db957ce38..6f40b1f898 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h
+++ b/tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h
@@ -21,10 +21,10 @@ limitations under the License.
#include <unordered_map>
#include <vector>
-#include "perftools/gputools/executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/visitable_allocator.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
namespace tensorflow {
diff --git a/tensorflow/core/common_runtime/gpu/gpu_debug_allocator_test.cc b/tensorflow/core/common_runtime/gpu/gpu_debug_allocator_test.cc
index 9e31198141..0923a1237b 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_debug_allocator_test.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_debug_allocator_test.cc
@@ -20,14 +20,13 @@ limitations under the License.
#include <algorithm>
#include <vector>
-#include "perftools/gputools/executor/multi_platform_manager.h"
-#include "perftools/gputools/executor/stream_executor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
+#include "tensorflow/core/platform/test.h"
namespace gpu = ::perftools::gputools;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_device.cc b/tensorflow/core/common_runtime/gpu/gpu_device.cc
index 5e13ee6a5a..13acb6e3a1 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_device.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_device.cc
@@ -25,10 +25,6 @@ limitations under the License.
#include <string.h>
#include <algorithm>
-#include "perftools/gputools/executor/cuda/cuda_activation.h"
-#include "perftools/gputools/executor/multi_platform_manager.h"
-#include "perftools/gputools/executor/stream.h"
-#include "perftools/gputools/executor/stream_executor.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
@@ -46,9 +42,11 @@ limitations under the License.
#include "tensorflow/core/lib/gtl/stl_util.h"
#include "tensorflow/core/lib/strings/numbers.h"
#include "tensorflow/core/lib/strings/strcat.h"
+#include "tensorflow/core/platform/cuda.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
#include "tensorflow/core/platform/tracing.h"
#include "tensorflow/core/public/session_options.h"
#include "tensorflow/core/public/status.h"
diff --git a/tensorflow/core/common_runtime/gpu/gpu_device.h b/tensorflow/core/common_runtime/gpu/gpu_device.h
index f95fc93a63..87ca21404b 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_device.h
+++ b/tensorflow/core/common_runtime/gpu/gpu_device.h
@@ -20,7 +20,6 @@ limitations under the License.
#ifndef TENSORFLOW_COMMON_RUNTIME_GPU_GPU_DEVICE_H_
#define TENSORFLOW_COMMON_RUNTIME_GPU_GPU_DEVICE_H_
-#include "perftools/gputools/executor/stream.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
@@ -31,6 +30,7 @@ limitations under the License.
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
#include "tensorflow/core/public/session_options.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/common_runtime/gpu/gpu_event_mgr.cc b/tensorflow/core/common_runtime/gpu/gpu_event_mgr.cc
index f4c92c6ca4..45dfc3e129 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_event_mgr.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_event_mgr.cc
@@ -15,9 +15,8 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
-#include "perftools/gputools/executor/event.h"
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/framework/config.pb.h"
+#include "tensorflow/core/platform/stream_executor.h"
namespace gpu = ::perftools::gputools;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_event_mgr.h b/tensorflow/core/common_runtime/gpu/gpu_event_mgr.h
index faac12b781..d6e053443d 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_event_mgr.h
+++ b/tensorflow/core/common_runtime/gpu/gpu_event_mgr.h
@@ -18,13 +18,13 @@ limitations under the License.
#include <deque>
#include <vector>
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/framework/tensor_reference.h"
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
#include "tensorflow/core/platform/thread_annotations.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/common_runtime/gpu/gpu_event_mgr_test.cc b/tensorflow/core/common_runtime/gpu/gpu_event_mgr_test.cc
index 158c952862..004eb078b5 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_event_mgr_test.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_event_mgr_test.cc
@@ -18,11 +18,10 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
#include <atomic>
-#include "perftools/gputools/executor/multi_platform_manager.h"
-#include "perftools/gputools/executor/stream_executor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/framework/config.pb.h"
+#include "tensorflow/core/platform/stream_executor.h"
+#include "tensorflow/core/platform/test.h"
namespace gpu = ::perftools::gputools;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_init.cc b/tensorflow/core/common_runtime/gpu/gpu_init.cc
index c6d2bba2d8..9832eeb36c 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_init.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_init.cc
@@ -17,13 +17,12 @@ limitations under the License.
#include <string>
-#include "perftools/gputools/executor/multi_platform_manager.h"
-#include "perftools/gputools/executor/stream_executor.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/strings/numbers.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
namespace gpu = ::perftools::gputools;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_region_allocator.cc b/tensorflow/core/common_runtime/gpu/gpu_region_allocator.cc
index 6be640e0e8..e40398fc96 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_region_allocator.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_region_allocator.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/gpu_region_allocator.h"
-#include "perftools/gputools/executor/multi_platform_manager.h"
#include "tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/lib/core/bits.h"
@@ -26,6 +25,7 @@ limitations under the License.
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
// If true, the CUDA gpu manager checks that all allocated memory
// through the GPU memory pool implementation has been freed.
diff --git a/tensorflow/core/common_runtime/gpu/gpu_region_allocator.h b/tensorflow/core/common_runtime/gpu/gpu_region_allocator.h
index e0809da503..2e70386c05 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_region_allocator.h
+++ b/tensorflow/core/common_runtime/gpu/gpu_region_allocator.h
@@ -21,13 +21,13 @@ limitations under the License.
#include <unordered_map>
#include <vector>
-#include "perftools/gputools/executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/gpu_allocator_retry.h"
#include "tensorflow/core/common_runtime/gpu/visitable_allocator.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
#include "tensorflow/core/platform/thread_annotations.h"
namespace tensorflow {
diff --git a/tensorflow/core/common_runtime/gpu/gpu_region_allocator_test.cc b/tensorflow/core/common_runtime/gpu/gpu_region_allocator_test.cc
index 0024008187..277ffebcc5 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_region_allocator_test.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_region_allocator_test.cc
@@ -20,12 +20,12 @@ limitations under the License.
#include <algorithm>
#include <vector>
-#include "perftools/gputools/executor/stream_executor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
+#include "tensorflow/core/platform/test.h"
namespace gpu = ::perftools::gputools;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_stream_util_test.cc b/tensorflow/core/common_runtime/gpu/gpu_stream_util_test.cc
index c9ae199b06..34c2d2f072 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_stream_util_test.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_stream_util_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/gpu_stream_util.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/cc/ops/array_ops.h"
#include "tensorflow/cc/ops/sendrecv_ops.h"
#include "tensorflow/cc/ops/standard_ops.h"
@@ -26,6 +25,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/common_runtime/gpu/gpu_util.cc b/tensorflow/core/common_runtime/gpu/gpu_util.cc
index d9dde94137..9d2f917f51 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_util.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_util.cc
@@ -15,8 +15,6 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/gpu_util.h"
-#include "perftools/gputools/executor/stream.h"
-#include "perftools/gputools/executor/stream_executor.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/gpu/dma_helper.h"
#include "tensorflow/core/common_runtime/gpu/gpu_event_mgr.h"
@@ -32,13 +30,12 @@ limitations under the License.
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/lib/strings/stringprintf.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/stream_executor.h"
#include "tensorflow/core/platform/tensor_coding.h"
#include "tensorflow/core/platform/tracing.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/util/util.h"
-#include "tensorflow/core/platform/stream_executor_util.h"
-
// If this need to be runtime configurable, consider adding options to
// ConfigProto.
const tensorflow::int64 FLAGS_brain_gpu_util_debug_string_maxlen = 128;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_util.h b/tensorflow/core/common_runtime/gpu/gpu_util.h
index f79074332c..b9044fcd08 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_util.h
+++ b/tensorflow/core/common_runtime/gpu/gpu_util.h
@@ -16,14 +16,12 @@ limitations under the License.
#ifndef TENSORFLOW_COMMON_RUNTIME_GPU_GPU_UTIL_H_
#define TENSORFLOW_COMMON_RUNTIME_GPU_GPU_UTIL_H_
-#include "perftools/gputools/executor/device_memory.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/gpu/dma_helper.h"
+#include "tensorflow/core/platform/stream_executor.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/tensor.h"
-#include "perftools/gputools/executor/stream.h"
-
namespace tensorflow {
class RecvTensorResponse;
diff --git a/tensorflow/core/common_runtime/gpu/gpu_util_platform_specific.cc b/tensorflow/core/common_runtime/gpu/gpu_util_platform_specific.cc
index bb4dd23869..b319b6966e 100644
--- a/tensorflow/core/common_runtime/gpu/gpu_util_platform_specific.cc
+++ b/tensorflow/core/common_runtime/gpu/gpu_util_platform_specific.cc
@@ -13,11 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/common_runtime/device.h"
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/common_runtime/gpu/gpu_util.h"
+#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#include "tensorflow/core/framework/types.h"
+#include "tensorflow/core/platform/stream_executor.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/common_runtime/gpu/pool_allocator.h b/tensorflow/core/common_runtime/gpu/pool_allocator.h
index f518485842..27d5fb5282 100644
--- a/tensorflow/core/common_runtime/gpu/pool_allocator.h
+++ b/tensorflow/core/common_runtime/gpu/pool_allocator.h
@@ -23,7 +23,6 @@ limitations under the License.
#include <atomic>
#include <map>
#include <memory>
-#include "perftools/gputools/executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu/visitable_allocator.h"
#include "tensorflow/core/lib/core/bits.h"
#include "tensorflow/core/platform/logging.h"
@@ -31,6 +30,7 @@ limitations under the License.
#include "tensorflow/core/platform/mem.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
namespace tensorflow {
diff --git a/tensorflow/core/common_runtime/gpu/pool_allocator_test.cc b/tensorflow/core/common_runtime/gpu/pool_allocator_test.cc
index 5c4c70b6e0..fd2cfb0788 100644
--- a/tensorflow/core/common_runtime/gpu/pool_allocator_test.cc
+++ b/tensorflow/core/common_runtime/gpu/pool_allocator_test.cc
@@ -17,9 +17,8 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/pool_allocator.h"
-#include "perftools/gputools/executor/multi_platform_manager.h"
-#include "perftools/gputools/executor/platform.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/stream_executor.h"
+#include "tensorflow/core/platform/test.h"
namespace gpu = ::perftools::gputools;
diff --git a/tensorflow/core/common_runtime/gpu/process_state.cc b/tensorflow/core/common_runtime/gpu/process_state.cc
index a3bd338ad7..8ca87b90ed 100644
--- a/tensorflow/core/common_runtime/gpu/process_state.cc
+++ b/tensorflow/core/common_runtime/gpu/process_state.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/common_runtime/gpu/process_state.h"
-#include "perftools/gputools/executor/multi_platform_manager.h"
#include "tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.h"
#include "tensorflow/core/common_runtime/gpu/gpu_debug_allocator.h"
#include "tensorflow/core/common_runtime/gpu/gpu_init.h"
@@ -26,6 +25,7 @@ limitations under the License.
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/stream_executor.h"
// If these flags need to be runtime configurable, consider adding
// options to ConfigProto.
diff --git a/tensorflow/core/common_runtime/session_test.cc b/tensorflow/core/common_runtime/session_test.cc
index cc1d58d394..dc9d3424f2 100644
--- a/tensorflow/core/common_runtime/session_test.cc
+++ b/tensorflow/core/common_runtime/session_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/public/session.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/session_options.h"
namespace tensorflow {
diff --git a/tensorflow/core/common_runtime/simple_placer_test.cc b/tensorflow/core/common_runtime/simple_placer_test.cc
index 2239d93b45..00f9dfba56 100644
--- a/tensorflow/core/common_runtime/simple_placer_test.cc
+++ b/tensorflow/core/common_runtime/simple_placer_test.cc
@@ -20,7 +20,6 @@ limitations under the License.
#include <utility>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/device_set.h"
#include "tensorflow/core/framework/device_attributes.pb.h"
@@ -36,6 +35,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/allocator_test.cc b/tensorflow/core/framework/allocator_test.cc
index 508fdad995..98e5922684 100644
--- a/tensorflow/core/framework/allocator_test.cc
+++ b/tensorflow/core/framework/allocator_test.cc
@@ -15,8 +15,8 @@ limitations under the License.
#include "tensorflow/core/framework/allocator.h"
#include <algorithm>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
TEST(CPUAllocatorTest, Simple) {
diff --git a/tensorflow/core/framework/attr_value_util_test.cc b/tensorflow/core/framework/attr_value_util_test.cc
index daf0e61637..0ffb29030d 100644
--- a/tensorflow/core/framework/attr_value_util_test.cc
+++ b/tensorflow/core/framework/attr_value_util_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/framework/attr_value_util.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/bfloat16_test.cc b/tensorflow/core/framework/bfloat16_test.cc
index 12f415e0c1..636abb7526 100644
--- a/tensorflow/core/framework/bfloat16_test.cc
+++ b/tensorflow/core/framework/bfloat16_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/framework/bfloat16.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/cancellation_test.cc b/tensorflow/core/framework/cancellation_test.cc
index dbca99418d..ee42d9c197 100644
--- a/tensorflow/core/framework/cancellation_test.cc
+++ b/tensorflow/core/framework/cancellation_test.cc
@@ -15,9 +15,9 @@ limitations under the License.
#include "tensorflow/core/framework/cancellation.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/lib/core/threadpool.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/function_test.cc b/tensorflow/core/framework/function_test.cc
index b5d71f055f..716d09d4dd 100644
--- a/tensorflow/core/framework/function_test.cc
+++ b/tensorflow/core/framework/function_test.cc
@@ -14,7 +14,6 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/framework/function.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/function.pb.h"
#include "tensorflow/core/framework/function_testlib.h"
#include "tensorflow/core/framework/graph.pb.h"
@@ -26,6 +25,7 @@ limitations under the License.
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/kernel_def_builder_test.cc b/tensorflow/core/framework/kernel_def_builder_test.cc
index 16848085ed..118c65b79d 100644
--- a/tensorflow/core/framework/kernel_def_builder_test.cc
+++ b/tensorflow/core/framework/kernel_def_builder_test.cc
@@ -15,9 +15,9 @@ limitations under the License.
#include "tensorflow/core/framework/kernel_def_builder.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/kernel_def.pb.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/node_def_builder_test.cc b/tensorflow/core/framework/node_def_builder_test.cc
index 708f6d95b7..f0b80fff20 100644
--- a/tensorflow/core/framework/node_def_builder_test.cc
+++ b/tensorflow/core/framework/node_def_builder_test.cc
@@ -16,13 +16,13 @@ limitations under the License.
#include "tensorflow/core/framework/node_def_builder.h"
#include <memory>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/node_def_util.h"
#include "tensorflow/core/framework/op_def_builder.h"
#include "tensorflow/core/framework/op_def_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/node_def_util_test.cc b/tensorflow/core/framework/node_def_util_test.cc
index 1713d42998..3d4dda7d39 100644
--- a/tensorflow/core/framework/node_def_util_test.cc
+++ b/tensorflow/core/framework/node_def_util_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/framework/node_def_util.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/op_def_builder.h"
@@ -23,6 +22,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/op_compatibility_test.cc b/tensorflow/core/framework/op_compatibility_test.cc
index e22a5c8fed..d6b51242c7 100644
--- a/tensorflow/core/framework/op_compatibility_test.cc
+++ b/tensorflow/core/framework/op_compatibility_test.cc
@@ -16,12 +16,12 @@ limitations under the License.
// Test that verifies that various changes to an OpDef are
// backwards-compatible.
+#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/fake_input.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/node_def_util.h"
-#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/kernels/ops_testutil.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/op_def_builder_test.cc b/tensorflow/core/framework/op_def_builder_test.cc
index e7c57d912e..37af529ac3 100644
--- a/tensorflow/core/framework/op_def_builder_test.cc
+++ b/tensorflow/core/framework/op_def_builder_test.cc
@@ -15,13 +15,13 @@ limitations under the License.
#include "tensorflow/core/framework/op_def_builder.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/op_def_util_test.cc b/tensorflow/core/framework/op_def_util_test.cc
index 133a1360c5..471aa99c21 100644
--- a/tensorflow/core/framework/op_def_util_test.cc
+++ b/tensorflow/core/framework/op_def_util_test.cc
@@ -15,13 +15,13 @@ limitations under the License.
#include "tensorflow/core/framework/op_def_util.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/op_def.pb.h"
#include "tensorflow/core/framework/op_def_builder.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/op_kernel_test.cc b/tensorflow/core/framework/op_kernel_test.cc
index 7d4214e85e..71bea07d04 100644
--- a/tensorflow/core/framework/op_kernel_test.cc
+++ b/tensorflow/core/framework/op_kernel_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/attr_value_util.h"
#include "tensorflow/core/framework/fake_input.h"
@@ -30,6 +29,7 @@ limitations under the License.
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/version.h"
class DummyKernel : public tensorflow::OpKernel {
diff --git a/tensorflow/core/framework/op_segment_test.cc b/tensorflow/core/framework/op_segment_test.cc
index 6f123748f8..60bcf8378c 100644
--- a/tensorflow/core/framework/op_segment_test.cc
+++ b/tensorflow/core/framework/op_segment_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/framework/op_segment.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
@@ -25,6 +24,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/version.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/partial_tensor_shape_test.cc b/tensorflow/core/framework/partial_tensor_shape_test.cc
index 1d17fda61d..bce87a06d1 100644
--- a/tensorflow/core/framework/partial_tensor_shape_test.cc
+++ b/tensorflow/core/framework/partial_tensor_shape_test.cc
@@ -15,8 +15,8 @@ limitations under the License.
#include "tensorflow/core/public/partial_tensor_shape.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/errors.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/rendezvous_test.cc b/tensorflow/core/framework/rendezvous_test.cc
index cf9afaa750..9ac454934e 100644
--- a/tensorflow/core/framework/rendezvous_test.cc
+++ b/tensorflow/core/framework/rendezvous_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/framework/rendezvous.h"
-#include "testing/base/public/gunit.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/framework/types.pb.h"
diff --git a/tensorflow/core/framework/resource_mgr_test.cc b/tensorflow/core/framework/resource_mgr_test.cc
index c4268c2592..f776d1ebcc 100644
--- a/tensorflow/core/framework/resource_mgr_test.cc
+++ b/tensorflow/core/framework/resource_mgr_test.cc
@@ -15,10 +15,10 @@ limitations under the License.
#include "tensorflow/core/framework/resource_mgr.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/node_def_util.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/strings/strcat.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/tensor_shape_test.cc b/tensorflow/core/framework/tensor_shape_test.cc
index 240c8ac457..44682d38b1 100644
--- a/tensorflow/core/framework/tensor_shape_test.cc
+++ b/tensorflow/core/framework/tensor_shape_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/public/tensor_shape.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/tensor_slice_test.cc b/tensorflow/core/framework/tensor_slice_test.cc
index fafc958847..4aac9671d3 100644
--- a/tensorflow/core/framework/tensor_slice_test.cc
+++ b/tensorflow/core/framework/tensor_slice_test.cc
@@ -15,10 +15,10 @@ limitations under the License.
#include "tensorflow/core/framework/tensor_slice.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/tensor_test.cc b/tensorflow/core/framework/tensor_test.cc
index a99731644f..a697305c83 100644
--- a/tensorflow/core/framework/tensor_test.cc
+++ b/tensorflow/core/framework/tensor_test.cc
@@ -15,11 +15,11 @@ limitations under the License.
#include "tensorflow/core/public/tensor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/tensor_testutil.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/tensor_testutil.h b/tensorflow/core/framework/tensor_testutil.h
index a04f4017aa..502bdc1f20 100644
--- a/tensorflow/core/framework/tensor_testutil.h
+++ b/tensorflow/core/framework/tensor_testutil.h
@@ -16,9 +16,9 @@ limitations under the License.
#ifndef TENSORFLOW_FRAMEWORK_TENSOR_TESTUTIL_H_
#define TENSORFLOW_FRAMEWORK_TENSOR_TESTUTIL_H_
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/tensor_util_test.cc b/tensorflow/core/framework/tensor_util_test.cc
index 683c8e34d2..9c027e345c 100644
--- a/tensorflow/core/framework/tensor_util_test.cc
+++ b/tensorflow/core/framework/tensor_util_test.cc
@@ -15,8 +15,8 @@ limitations under the License.
#include "tensorflow/core/framework/tensor_util.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/types.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/tracking_allocator_test.cc b/tensorflow/core/framework/tracking_allocator_test.cc
index fe4f225375..53aad0fca1 100644
--- a/tensorflow/core/framework/tracking_allocator_test.cc
+++ b/tensorflow/core/framework/tracking_allocator_test.cc
@@ -17,9 +17,9 @@ limitations under the License.
#include <unordered_map>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/framework/types_test.cc b/tensorflow/core/framework/types_test.cc
index b2a8d0ac36..7a70ff22de 100644
--- a/tensorflow/core/framework/types_test.cc
+++ b/tensorflow/core/framework/types_test.cc
@@ -15,9 +15,9 @@ limitations under the License.
#include "tensorflow/core/framework/types.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/type_traits.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/framework/unique_tensor_references_test.cc b/tensorflow/core/framework/unique_tensor_references_test.cc
index 215fdca104..42d3de9126 100644
--- a/tensorflow/core/framework/unique_tensor_references_test.cc
+++ b/tensorflow/core/framework/unique_tensor_references_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/framework/unique_tensor_references.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/status.h"
namespace tensorflow {
diff --git a/tensorflow/core/graph/algorithm_test.cc b/tensorflow/core/graph/algorithm_test.cc
index fb1ada6793..decf5befed 100644
--- a/tensorflow/core/graph/algorithm_test.cc
+++ b/tensorflow/core/graph/algorithm_test.cc
@@ -18,13 +18,13 @@ limitations under the License.
#include <string>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/graph_def_builder.h"
#include "tensorflow/core/graph/subgraph.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/status.h"
// TODO(josh11b): Test setting the "device" field of a NodeDef.
diff --git a/tensorflow/core/graph/edgeset_test.cc b/tensorflow/core/graph/edgeset_test.cc
index 4efb8440a2..c9e835f6c0 100644
--- a/tensorflow/core/graph/edgeset_test.cc
+++ b/tensorflow/core/graph/edgeset_test.cc
@@ -15,8 +15,8 @@ limitations under the License.
#include "tensorflow/core/graph/edgeset.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/graph/graph.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
class EdgeSetTest : public ::testing::Test {
diff --git a/tensorflow/core/graph/equal_graph_def_test.cc b/tensorflow/core/graph/equal_graph_def_test.cc
index 616861a96e..203b248908 100644
--- a/tensorflow/core/graph/equal_graph_def_test.cc
+++ b/tensorflow/core/graph/equal_graph_def_test.cc
@@ -15,11 +15,11 @@ limitations under the License.
#include "tensorflow/core/graph/equal_graph_def.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/node_def_util.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/graph/graph_def_builder.h"
#include "tensorflow/core/kernels/ops_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/version.h"
namespace tensorflow {
diff --git a/tensorflow/core/graph/graph_constructor_test.cc b/tensorflow/core/graph/graph_constructor_test.cc
index cecc754eea..06109e3470 100644
--- a/tensorflow/core/graph/graph_constructor_test.cc
+++ b/tensorflow/core/graph/graph_constructor_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/graph/graph_constructor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/kernels/ops_util.h"
@@ -23,6 +22,7 @@ limitations under the License.
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/regexp.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/status.h"
#include "tensorflow/core/public/version.h"
diff --git a/tensorflow/core/graph/graph_def_builder_test.cc b/tensorflow/core/graph/graph_def_builder_test.cc
index 8f58a1b1cb..a70fe8692f 100644
--- a/tensorflow/core/graph/graph_def_builder_test.cc
+++ b/tensorflow/core/graph/graph_def_builder_test.cc
@@ -15,10 +15,10 @@ limitations under the License.
#include "tensorflow/core/graph/graph_def_builder.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/version.h"
namespace tensorflow {
diff --git a/tensorflow/core/graph/graph_partition_test.cc b/tensorflow/core/graph/graph_partition_test.cc
index 2e4993b763..a1645dc495 100644
--- a/tensorflow/core/graph/graph_partition_test.cc
+++ b/tensorflow/core/graph/graph_partition_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <unordered_map>
-#include "testing/base/public/gunit.h"
#include "tensorflow/cc/ops/array_ops.h"
#include "tensorflow/cc/ops/const_op.h"
#include "tensorflow/cc/ops/control_flow_ops.h"
@@ -32,6 +31,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/version.h"
namespace tensorflow {
diff --git a/tensorflow/core/graph/graph_test.cc b/tensorflow/core/graph/graph_test.cc
index 5302e69e74..013f1331ec 100644
--- a/tensorflow/core/graph/graph_test.cc
+++ b/tensorflow/core/graph/graph_test.cc
@@ -16,7 +16,6 @@ limitations under the License.
#include "tensorflow/core/graph/graph.h"
#include <set>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/graph/graph_constructor.h"
#include "tensorflow/core/graph/node_builder.h"
#include "tensorflow/core/kernels/ops_util.h"
@@ -24,7 +23,7 @@ limitations under the License.
#include "tensorflow/core/lib/strings/stringprintf.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
-#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
diff --git a/tensorflow/core/graph/node_builder_test.cc b/tensorflow/core/graph/node_builder_test.cc
index 37fdebca27..fc0e9405ec 100644
--- a/tensorflow/core/graph/node_builder_test.cc
+++ b/tensorflow/core/graph/node_builder_test.cc
@@ -15,11 +15,11 @@ limitations under the License.
#include "tensorflow/core/graph/node_builder.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/graph/optimizer_cse_test.cc b/tensorflow/core/graph/optimizer_cse_test.cc
index 7ae705036e..2cd9b5e0e9 100644
--- a/tensorflow/core/graph/optimizer_cse_test.cc
+++ b/tensorflow/core/graph/optimizer_cse_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/graph/optimizer_cse.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/graph_constructor.h"
@@ -26,6 +25,7 @@ limitations under the License.
#include "tensorflow/core/lib/strings/stringprintf.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/graph/subgraph_test.cc b/tensorflow/core/graph/subgraph_test.cc
index 72ede5daae..e80ebdd634 100644
--- a/tensorflow/core/graph/subgraph_test.cc
+++ b/tensorflow/core/graph/subgraph_test.cc
@@ -18,7 +18,6 @@ limitations under the License.
#include <string>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/graph/graph.h"
#include "tensorflow/core/graph/graph_constructor.h"
@@ -29,6 +28,7 @@ limitations under the License.
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/regexp.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/status.h"
diff --git a/tensorflow/core/graph/tensor_id_test.cc b/tensorflow/core/graph/tensor_id_test.cc
index 20dfea723e..2ce879413c 100644
--- a/tensorflow/core/graph/tensor_id_test.cc
+++ b/tensorflow/core/graph/tensor_id_test.cc
@@ -14,9 +14,9 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/graph/tensor_id.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
diff --git a/tensorflow/core/graph/validate_test.cc b/tensorflow/core/graph/validate_test.cc
index 11d6775594..1c3cd036d9 100644
--- a/tensorflow/core/graph/validate_test.cc
+++ b/tensorflow/core/graph/validate_test.cc
@@ -18,7 +18,6 @@ limitations under the License.
#include <string>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/graph_def_util.h"
#include "tensorflow/core/graph/graph.h"
@@ -26,6 +25,7 @@ limitations under the License.
#include "tensorflow/core/graph/subgraph.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/status.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/adjust_contrast_op_benchmark_test.cc b/tensorflow/core/kernels/adjust_contrast_op_benchmark_test.cc
index 4af5658390..710542f52e 100644
--- a/tensorflow/core/kernels/adjust_contrast_op_benchmark_test.cc
+++ b/tensorflow/core/kernels/adjust_contrast_op_benchmark_test.cc
@@ -13,11 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/public/tensor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/graph/node_builder.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
+#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/adjust_contrast_op_test.cc b/tensorflow/core/kernels/adjust_contrast_op_test.cc
index 21549323b0..e798be37eb 100644
--- a/tensorflow/core/kernels/adjust_contrast_op_test.cc
+++ b/tensorflow/core/kernels/adjust_contrast_op_test.cc
@@ -14,7 +14,6 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/framework/allocator.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
@@ -25,6 +24,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/batch_matmul_op.cc b/tensorflow/core/kernels/batch_matmul_op.cc
index aa7a496107..b88a74170c 100644
--- a/tensorflow/core/kernels/batch_matmul_op.cc
+++ b/tensorflow/core/kernels/batch_matmul_op.cc
@@ -29,8 +29,8 @@ limitations under the License.
#include "tensorflow/core/util/work_sharder.h"
#if GOOGLE_CUDA
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
+#include "tensorflow/core/platform/stream_executor.h"
#endif // GOOGLE_CUDA
namespace tensorflow {
diff --git a/tensorflow/core/kernels/cast_op_test.cc b/tensorflow/core/kernels/cast_op_test.cc
index 772bcc4207..cea2054413 100644
--- a/tensorflow/core/kernels/cast_op_test.cc
+++ b/tensorflow/core/kernels/cast_op_test.cc
@@ -13,13 +13,13 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/framework/fake_input.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
+#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/check_numerics_op.cc b/tensorflow/core/kernels/check_numerics_op.cc
index cabff983f8..976ca4984b 100644
--- a/tensorflow/core/kernels/check_numerics_op.cc
+++ b/tensorflow/core/kernels/check_numerics_op.cc
@@ -23,8 +23,8 @@ limitations under the License.
#include "tensorflow/core/public/tensor.h"
#if GOOGLE_CUDA
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
+#include "tensorflow/core/platform/stream_executor.h"
#endif // GOOGLE_CUDA
namespace tensorflow {
diff --git a/tensorflow/core/kernels/colorspace_op_test.cc b/tensorflow/core/kernels/colorspace_op_test.cc
index 188307460d..d78a99d9bb 100644
--- a/tensorflow/core/kernels/colorspace_op_test.cc
+++ b/tensorflow/core/kernels/colorspace_op_test.cc
@@ -14,7 +14,6 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/framework/allocator.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
@@ -25,6 +24,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/concat_op_test.cc b/tensorflow/core/kernels/concat_op_test.cc
index 8b4b75e956..901d71ff36 100644
--- a/tensorflow/core/kernels/concat_op_test.cc
+++ b/tensorflow/core/kernels/concat_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/op_kernel.h"
@@ -29,6 +28,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/platform/mem.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/control_flow_ops_test.cc b/tensorflow/core/kernels/control_flow_ops_test.cc
index 6532629784..8a1e95dfae 100644
--- a/tensorflow/core/kernels/control_flow_ops_test.cc
+++ b/tensorflow/core/kernels/control_flow_ops_test.cc
@@ -14,12 +14,12 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/framework/fake_input.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/tensor_testutil.h"
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/conv_grad_ops.cc b/tensorflow/core/kernels/conv_grad_ops.cc
index 18476bfdfa..0a636c4e29 100644
--- a/tensorflow/core/kernels/conv_grad_ops.cc
+++ b/tensorflow/core/kernels/conv_grad_ops.cc
@@ -34,9 +34,9 @@ limitations under the License.
#include "tensorflow/core/util/work_sharder.h"
#if GOOGLE_CUDA
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#include "tensorflow/core/kernels/conv_ops_gpu.h"
+#include "tensorflow/core/platform/stream_executor.h"
#endif // GOOGLE_CUDA
namespace tensorflow {
diff --git a/tensorflow/core/kernels/conv_ops.cc b/tensorflow/core/kernels/conv_ops.cc
index 3c213f3eb4..8d306768ae 100644
--- a/tensorflow/core/kernels/conv_ops.cc
+++ b/tensorflow/core/kernels/conv_ops.cc
@@ -34,9 +34,9 @@ limitations under the License.
#include "tensorflow/core/util/use_cudnn.h"
#if GOOGLE_CUDA
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#include "tensorflow/core/kernels/conv_ops_gpu.h"
+#include "tensorflow/core/platform/stream_executor.h"
#endif // GOOGLE_CUDA
namespace tensorflow {
diff --git a/tensorflow/core/kernels/conv_ops_gpu.h b/tensorflow/core/kernels/conv_ops_gpu.h
index f4225641da..8f58d3af26 100644
--- a/tensorflow/core/kernels/conv_ops_gpu.h
+++ b/tensorflow/core/kernels/conv_ops_gpu.h
@@ -13,13 +13,13 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#ifndef THIRD_PARTY_TENSORFLOW_CORE_KERNELS_CONV_OPS_GPU_H_
-#define THIRD_PARTY_TENSORFLOW_CORE_KERNELS_CONV_OPS_GPU_H_
+#ifndef TENSORFLOW_CORE_KERNELS_CONV_OPS_GPU_H_
+#define TENSORFLOW_CORE_KERNELS_CONV_OPS_GPU_H_
#if GOOGLE_CUDA
-#include "perftools/gputools/executor/scratch_allocator.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
+#include "tensorflow/core/platform/stream_executor.h"
namespace tensorflow {
@@ -82,4 +82,4 @@ class CudnnScratchAllocator : public perftools::gputools::ScratchAllocator {
#endif // GOOGLE_CUDA
-#endif // THIRD_PARTY_TENSORFLOW_CORE_KERNELS_CONV_OPS_GPU_H_
+#endif // TENSORFLOW_CORE_KERNELS_CONV_OPS_GPU_H_
diff --git a/tensorflow/core/kernels/core_ops_test.cc b/tensorflow/core/kernels/core_ops_test.cc
index 41ab13a3b4..007df30014 100644
--- a/tensorflow/core/kernels/core_ops_test.cc
+++ b/tensorflow/core/kernels/core_ops_test.cc
@@ -24,7 +24,6 @@ limitations under the License.
#include <unordered_map>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/cc/ops/const_op.h"
#include "tensorflow/cc/ops/nn_ops.h"
#include "tensorflow/core/common_runtime/device_factory.h"
@@ -45,6 +44,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/session.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/cwise_ops_test.cc b/tensorflow/core/kernels/cwise_ops_test.cc
index 5b8e73d1c2..11211763f1 100644
--- a/tensorflow/core/kernels/cwise_ops_test.cc
+++ b/tensorflow/core/kernels/cwise_ops_test.cc
@@ -13,11 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/public/tensor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/kernels/ops_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
+#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/dynamic_partition_op_test.cc b/tensorflow/core/kernels/dynamic_partition_op_test.cc
index 735a5df098..5edd200429 100644
--- a/tensorflow/core/kernels/dynamic_partition_op_test.cc
+++ b/tensorflow/core/kernels/dynamic_partition_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
@@ -28,6 +27,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/dynamic_stitch_op_test.cc b/tensorflow/core/kernels/dynamic_stitch_op_test.cc
index f21d000503..c1e4927146 100644
--- a/tensorflow/core/kernels/dynamic_stitch_op_test.cc
+++ b/tensorflow/core/kernels/dynamic_stitch_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
@@ -30,6 +29,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/fft_ops.cc b/tensorflow/core/kernels/fft_ops.cc
index fd7d66082d..edf5a0263e 100644
--- a/tensorflow/core/kernels/fft_ops.cc
+++ b/tensorflow/core/kernels/fft_ops.cc
@@ -28,8 +28,8 @@ limitations under the License.
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#if GOOGLE_CUDA
-#include "perftools/gputools/executor/stream_executor.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
+#include "tensorflow/core/platform/stream_executor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/gather_op_test.cc b/tensorflow/core/kernels/gather_op_test.cc
index 1744455233..7063171e65 100644
--- a/tensorflow/core/kernels/gather_op_test.cc
+++ b/tensorflow/core/kernels/gather_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
@@ -30,6 +29,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/gtl/array_slice.h"
#include "tensorflow/core/lib/random/simple_philox.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/identity_op_test.cc b/tensorflow/core/kernels/identity_op_test.cc
index 987f4f3030..70e437c269 100644
--- a/tensorflow/core/kernels/identity_op_test.cc
+++ b/tensorflow/core/kernels/identity_op_test.cc
@@ -14,7 +14,6 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/framework/fake_input.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
#include "tensorflow/core/framework/tensor_testutil.h"
@@ -22,6 +21,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/lrn_op_test.cc b/tensorflow/core/kernels/lrn_op_test.cc
index 8d63f6773d..fc5edd26b8 100644
--- a/tensorflow/core/kernels/lrn_op_test.cc
+++ b/tensorflow/core/kernels/lrn_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
@@ -29,6 +28,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/random/simple_philox.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/matmul_op.cc b/tensorflow/core/kernels/matmul_op.cc
index 758f25a571..fa1215f8df 100644
--- a/tensorflow/core/kernels/matmul_op.cc
+++ b/tensorflow/core/kernels/matmul_op.cc
@@ -24,8 +24,8 @@ limitations under the License.
#include "tensorflow/core/kernels/fill_functor.h"
#if GOOGLE_CUDA
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
+#include "tensorflow/core/platform/stream_executor.h"
#endif // GOOGLE_CUDA
namespace tensorflow {
diff --git a/tensorflow/core/kernels/matmul_op_test.cc b/tensorflow/core/kernels/matmul_op_test.cc
index 58fb156847..485492f925 100644
--- a/tensorflow/core/kernels/matmul_op_test.cc
+++ b/tensorflow/core/kernels/matmul_op_test.cc
@@ -13,10 +13,10 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/public/tensor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
+#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/maxpooling_op.cc b/tensorflow/core/kernels/maxpooling_op.cc
index e13ee8febd..7b0b07dfdc 100644
--- a/tensorflow/core/kernels/maxpooling_op.cc
+++ b/tensorflow/core/kernels/maxpooling_op.cc
@@ -36,9 +36,9 @@ limitations under the License.
#include "tensorflow/core/util/use_cudnn.h"
#if GOOGLE_CUDA
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/kernels/maxpooling_op_gpu.h"
#include "tensorflow/core/kernels/pooling_ops_common_gpu.h"
+#include "tensorflow/core/platform/stream_executor.h"
#endif // GOOGLE_CUDA
namespace tensorflow {
diff --git a/tensorflow/core/kernels/ops_testutil.h b/tensorflow/core/kernels/ops_testutil.h
index 5e0490eb11..a0d51667b2 100644
--- a/tensorflow/core/kernels/ops_testutil.h
+++ b/tensorflow/core/kernels/ops_testutil.h
@@ -19,7 +19,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/framework/allocator.h"
@@ -37,6 +36,7 @@ limitations under the License.
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/env.h"
#include "tensorflow/core/public/session_options.h"
#include "tensorflow/core/public/status.h"
diff --git a/tensorflow/core/kernels/ops_util_test.cc b/tensorflow/core/kernels/ops_util_test.cc
index b3453371bb..eba8eda847 100644
--- a/tensorflow/core/kernels/ops_util_test.cc
+++ b/tensorflow/core/kernels/ops_util_test.cc
@@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/kernels/ops_util.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/kernels/pooling_ops_common.cc b/tensorflow/core/kernels/pooling_ops_common.cc
index 7fa35c09db..d4afb53650 100644
--- a/tensorflow/core/kernels/pooling_ops_common.cc
+++ b/tensorflow/core/kernels/pooling_ops_common.cc
@@ -19,12 +19,11 @@ limitations under the License.
#include "tensorflow/core/public/tensor.h"
#if GOOGLE_CUDA
-#include "perftools/gputools/executor/dnn.h"
-#include "perftools/gputools/executor/stream.h"
#include "tensorflow/core/common_runtime/gpu_device_context.h"
#include "tensorflow/core/kernels/conv_2d.h"
#include "tensorflow/core/kernels/maxpooling_op_gpu.h"
#include "tensorflow/core/kernels/pooling_ops_common_gpu.h"
+#include "tensorflow/core/platform/stream_executor.h"
#endif // GOOGLE_CUDA
namespace tensorflow {
diff --git a/tensorflow/core/kernels/pooling_ops_common_gpu.h b/tensorflow/core/kernels/pooling_ops_common_gpu.h
index 441836f202..439e0977c2 100644
--- a/tensorflow/core/kernels/pooling_ops_common_gpu.h
+++ b/tensorflow/core/kernels/pooling_ops_common_gpu.h
@@ -17,10 +17,9 @@ limitations under the License.
#error This file must only be included when building with Cuda support
#endif
-#ifndef THIRD_PARTY_TENSORFLOW_CORE_KERNELS_POOLING_OPS_COMMON_GPU_H_
-#define THIRD_PARTY_TENSORFLOW_CORE_KERNELS_POOLING_OPS_COMMON_GPU_H_
+#ifndef TENSORFLOW_CORE_KERNELS_POOLING_OPS_COMMON_GPU_H_
+#define TENSORFLOW_CORE_KERNELS_POOLING_OPS_COMMON_GPU_H_
-#include "perftools/gputools/executor/dnn.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/NeuralNetworks"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/numeric_op.h"
@@ -28,6 +27,7 @@ limitations under the License.
#include "tensorflow/core/kernels/avgpooling_op.h"
#include "tensorflow/core/kernels/maxpooling_op.h"
#include "tensorflow/core/kernels/ops_util.h"
+#include "tensorflow/core/platform/stream_executor.h"
#include "tensorflow/core/public/tensor_shape.h"
#include "tensorflow/core/util/padding.h"
@@ -51,4 +51,4 @@ class DnnPoolingGradOp {
} // namespace tensorflow
-#endif // THIRD_PARTY_TENSORFLOW_CORE_KERNELS_POOLING_OPS_COMMON_GPU_H_
+#endif // TENSORFLOW_CORE_KERNELS_POOLING_OPS_COMMON_GPU_H_
diff --git a/tensorflow/core/kernels/random_crop_op_test.cc b/tensorflow/core/kernels/random_crop_op_test.cc
index 2e50567683..b9dea9325f 100644
--- a/tensorflow/core/kernels/random_crop_op_test.cc
+++ b/tensorflow/core/kernels/random_crop_op_test.cc
@@ -14,7 +14,6 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/framework/allocator.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
@@ -25,6 +24,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/random_op_test.cc b/tensorflow/core/kernels/random_op_test.cc
index bd8976a788..1158f38143 100644
--- a/tensorflow/core/kernels/random_op_test.cc
+++ b/tensorflow/core/kernels/random_op_test.cc
@@ -15,9 +15,9 @@ limitations under the License.
#include <random>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/lib/random/philox_random.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/range_sampler_test.cc b/tensorflow/core/kernels/range_sampler_test.cc
index 6ff34b8478..ec9fd1c4ee 100644
--- a/tensorflow/core/kernels/range_sampler_test.cc
+++ b/tensorflow/core/kernels/range_sampler_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/kernels/range_sampler.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/io/path.h"
diff --git a/tensorflow/core/kernels/reduction_ops_test.cc b/tensorflow/core/kernels/reduction_ops_test.cc
index 5bb42909da..a025cf9093 100644
--- a/tensorflow/core/kernels/reduction_ops_test.cc
+++ b/tensorflow/core/kernels/reduction_ops_test.cc
@@ -13,10 +13,10 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/public/tensor.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
+#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/resize_bilinear_op_test.cc b/tensorflow/core/kernels/resize_bilinear_op_test.cc
index 6e44169f34..6e32d74a5e 100644
--- a/tensorflow/core/kernels/resize_bilinear_op_test.cc
+++ b/tensorflow/core/kernels/resize_bilinear_op_test.cc
@@ -14,7 +14,6 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/framework/allocator.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
@@ -25,6 +24,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/resize_nearest_neighbor_op_test.cc b/tensorflow/core/kernels/resize_nearest_neighbor_op_test.cc
index 5487ebe9a0..457b743651 100644
--- a/tensorflow/core/kernels/resize_nearest_neighbor_op_test.cc
+++ b/tensorflow/core/kernels/resize_nearest_neighbor_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
// order to compare the reference implementation for image resizing in Python
// Image Library.
#include "tensorflow/core/framework/allocator.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def_builder.h"
@@ -28,6 +27,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/kernels/restore_op_test.cc b/tensorflow/core/kernels/restore_op_test.cc
index 6a1dc3a0b0..1dbd452843 100644
--- a/tensorflow/core/kernels/restore_op_test.cc
+++ b/tensorflow/core/kernels/restore_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/framework/allocator.h"
diff --git a/tensorflow/core/kernels/reverse_op_test.cc b/tensorflow/core/kernels/reverse_op_test.cc
index c3a37f4a69..4fa31c7d56 100644
--- a/tensorflow/core/kernels/reverse_op_test.cc
+++ b/tensorflow/core/kernels/reverse_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/framework/allocator.h"
diff --git a/tensorflow/core/kernels/save_op_test.cc b/tensorflow/core/kernels/save_op_test.cc
index 745e37049e..2241cec423 100644
--- a/tensorflow/core/kernels/save_op_test.cc
+++ b/tensorflow/core/kernels/save_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
diff --git a/tensorflow/core/kernels/scatter_op_test.cc b/tensorflow/core/kernels/scatter_op_test.cc
index f2b0bba33f..27db873305 100644
--- a/tensorflow/core/kernels/scatter_op_test.cc
+++ b/tensorflow/core/kernels/scatter_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
@@ -30,6 +29,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/segment_reduction_ops_test.cc b/tensorflow/core/kernels/segment_reduction_ops_test.cc
index bf0dffd289..0049a18167 100644
--- a/tensorflow/core/kernels/segment_reduction_ops_test.cc
+++ b/tensorflow/core/kernels/segment_reduction_ops_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include "tensorflow/core/public/session_options.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
@@ -33,6 +32,7 @@ limitations under the License.
#include "tensorflow/core/graph/testlib.h"
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
#include "tensorflow/core/public/version.h"
diff --git a/tensorflow/core/kernels/slice_op_test.cc b/tensorflow/core/kernels/slice_op_test.cc
index 9324168e1a..43c3f9ddbf 100644
--- a/tensorflow/core/kernels/slice_op_test.cc
+++ b/tensorflow/core/kernels/slice_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/graph.pb.h"
@@ -29,6 +28,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/sparse_matmul_op_test.cc b/tensorflow/core/kernels/sparse_matmul_op_test.cc
index 03c213bdec..cbd7c5af4f 100644
--- a/tensorflow/core/kernels/sparse_matmul_op_test.cc
+++ b/tensorflow/core/kernels/sparse_matmul_op_test.cc
@@ -13,12 +13,12 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/framework/types.pb.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
+#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/graph/node_builder.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/lib/strings/stringprintf.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/sparse_to_dense_op_test.cc b/tensorflow/core/kernels/sparse_to_dense_op_test.cc
index 8040dc5c2e..39a532e053 100644
--- a/tensorflow/core/kernels/sparse_to_dense_op_test.cc
+++ b/tensorflow/core/kernels/sparse_to_dense_op_test.cc
@@ -16,7 +16,6 @@ limitations under the License.
#include <functional>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/device.h"
#include "tensorflow/core/common_runtime/device_factory.h"
#include "tensorflow/core/framework/allocator.h"
@@ -29,6 +28,7 @@ limitations under the License.
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/session.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/summary_image_op_test.cc b/tensorflow/core/kernels/summary_image_op_test.cc
index 693287e32a..94bf005c84 100644
--- a/tensorflow/core/kernels/summary_image_op_test.cc
+++ b/tensorflow/core/kernels/summary_image_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
@@ -32,6 +31,7 @@ limitations under the License.
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/env.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/summary_op_test.cc b/tensorflow/core/kernels/summary_op_test.cc
index 9d533b350f..7926271773 100644
--- a/tensorflow/core/kernels/summary_op_test.cc
+++ b/tensorflow/core/kernels/summary_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/allocator.h"
#include "tensorflow/core/framework/fake_input.h"
#include "tensorflow/core/framework/graph.pb.h"
@@ -33,6 +32,7 @@ limitations under the License.
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/env.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/training_ops_test.cc b/tensorflow/core/kernels/training_ops_test.cc
index 3d5f15b709..56fa6be3a1 100644
--- a/tensorflow/core/kernels/training_ops_test.cc
+++ b/tensorflow/core/kernels/training_ops_test.cc
@@ -13,9 +13,9 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/kernels/ops_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/session_options.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/unique_op_test.cc b/tensorflow/core/kernels/unique_op_test.cc
index d20f7c7d45..a082478cd2 100644
--- a/tensorflow/core/kernels/unique_op_test.cc
+++ b/tensorflow/core/kernels/unique_op_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/framework/types.pb.h"
@@ -26,6 +25,7 @@ limitations under the License.
#include "tensorflow/core/kernels/ops_testutil.h"
#include "tensorflow/core/kernels/ops_util.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/tensor.h"
diff --git a/tensorflow/core/kernels/xent_op_test.cc b/tensorflow/core/kernels/xent_op_test.cc
index f6347eba80..a2a2c4e3da 100644
--- a/tensorflow/core/kernels/xent_op_test.cc
+++ b/tensorflow/core/kernels/xent_op_test.cc
@@ -13,11 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/public/tensor.h"
-#include "testing/base/public/gunit.h"
-#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
#include "tensorflow/core/kernels/xent_op.h"
+#include "tensorflow/core/common_runtime/kernel_benchmark_testlib.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
+#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/core/arena_test.cc b/tensorflow/core/lib/core/arena_test.cc
index 726d93a1f3..7282145fac 100644
--- a/tensorflow/core/lib/core/arena_test.cc
+++ b/tensorflow/core/lib/core/arena_test.cc
@@ -15,8 +15,8 @@ limitations under the License.
#include "tensorflow/core/lib/core/arena.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/platform/macros.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace core {
diff --git a/tensorflow/core/lib/core/bit_cast_test.cc b/tensorflow/core/lib/core/bit_cast_test.cc
index 508fc2f75a..200dd4a788 100644
--- a/tensorflow/core/lib/core/bit_cast_test.cc
+++ b/tensorflow/core/lib/core/bit_cast_test.cc
@@ -15,10 +15,10 @@ limitations under the License.
// Unit test for bit_cast template.
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/casts.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/macros.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/core/blocking_counter_test.cc b/tensorflow/core/lib/core/blocking_counter_test.cc
index 5de899fee3..c630a4e00d 100644
--- a/tensorflow/core/lib/core/blocking_counter_test.cc
+++ b/tensorflow/core/lib/core/blocking_counter_test.cc
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/lib/core/blocking_counter.h"
#include "tensorflow/core/lib/core/threadpool.h"
diff --git a/tensorflow/core/lib/core/coding_test.cc b/tensorflow/core/lib/core/coding_test.cc
index 6359cbe103..6f5855c893 100644
--- a/tensorflow/core/lib/core/coding_test.cc
+++ b/tensorflow/core/lib/core/coding_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/coding.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace core {
diff --git a/tensorflow/core/lib/core/errors.h b/tensorflow/core/lib/core/errors.h
index 0a13e81fe8..203cdd4faa 100644
--- a/tensorflow/core/lib/core/errors.h
+++ b/tensorflow/core/lib/core/errors.h
@@ -33,7 +33,7 @@ template <typename... Args>
void AppendToMessage(::tensorflow::Status* status, Args... args) {
*status = ::tensorflow::Status(
status->code(),
- strings::StrCat(status->error_message(), "\n\t", args...));
+ ::tensorflow::strings::StrCat(status->error_message(), "\n\t", args...));
}
// For propagating errors when calling a function.
@@ -58,14 +58,14 @@ void AppendToMessage(::tensorflow::Status* status, Args... args) {
// if (errors::IsInvalidArgument(status)) { ... }
// switch (status.code()) { case error::INVALID_ARGUMENT: ... }
-#define DECLARE_ERROR(FUNC, CONST) \
- template <typename... Args> \
- inline ::tensorflow::Status FUNC(Args... args) { \
- return ::tensorflow::Status(::tensorflow::error::CONST, \
- strings::StrCat(args...)); \
- } \
- inline bool Is##FUNC(const ::tensorflow::Status& status) { \
- return status.code() == ::tensorflow::error::CONST; \
+#define DECLARE_ERROR(FUNC, CONST) \
+ template <typename... Args> \
+ inline ::tensorflow::Status FUNC(Args... args) { \
+ return ::tensorflow::Status(::tensorflow::error::CONST, \
+ ::tensorflow::strings::StrCat(args...)); \
+ } \
+ inline bool Is##FUNC(const ::tensorflow::Status& status) { \
+ return status.code() == ::tensorflow::error::CONST; \
}
DECLARE_ERROR(Cancelled, CANCELLED)
diff --git a/tensorflow/core/lib/core/notification_test.cc b/tensorflow/core/lib/core/notification_test.cc
index 29a7bbc869..b4845e096d 100644
--- a/tensorflow/core/lib/core/notification_test.cc
+++ b/tensorflow/core/lib/core/notification_test.cc
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/lib/core/notification.h"
#include "tensorflow/core/lib/core/threadpool.h"
diff --git a/tensorflow/core/lib/core/refcount_test.cc b/tensorflow/core/lib/core/refcount_test.cc
index 98893508bc..a75f6ec774 100644
--- a/tensorflow/core/lib/core/refcount_test.cc
+++ b/tensorflow/core/lib/core/refcount_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/lib/core/refcount.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace core {
diff --git a/tensorflow/core/lib/core/status_test.cc b/tensorflow/core/lib/core/status_test.cc
index 5201de02d6..a601597802 100644
--- a/tensorflow/core/lib/core/status_test.cc
+++ b/tensorflow/core/lib/core/status_test.cc
@@ -14,9 +14,9 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/public/status.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/core/status_test_util.h b/tensorflow/core/lib/core/status_test_util.h
index fb28f2649e..b5ebbd4097 100644
--- a/tensorflow/core/lib/core/status_test_util.h
+++ b/tensorflow/core/lib/core/status_test_util.h
@@ -16,7 +16,7 @@ limitations under the License.
#ifndef TENSORFLOW_LIB_CORE_STATUS_TEST_UTIL_H_
#define TENSORFLOW_LIB_CORE_STATUS_TEST_UTIL_H_
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/status.h"
// Macros for testing the results of functions that return util::Status.
@@ -30,6 +30,5 @@ limitations under the License.
// If you want to check for particular errors, better alternatives are:
// EXPECT_EQ(::util::Status(...expected error...), status.StripMessage());
// EXPECT_THAT(status.ToString(), HasSubstr("expected error"));
-// Also, see testing/lib/util/status_util.h.
#endif // TENSORFLOW_LIB_CORE_STATUS_TEST_UTIL_H_
diff --git a/tensorflow/core/lib/core/threadpool_test.cc b/tensorflow/core/lib/core/threadpool_test.cc
index d85cf97f81..b29c83490f 100644
--- a/tensorflow/core/lib/core/threadpool_test.cc
+++ b/tensorflow/core/lib/core/threadpool_test.cc
@@ -17,7 +17,7 @@ limitations under the License.
#include <atomic>
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
#include "tensorflow/core/public/env.h"
diff --git a/tensorflow/core/lib/gtl/array_slice_test.cc b/tensorflow/core/lib/gtl/array_slice_test.cc
index 8b17f87e46..133386481c 100644
--- a/tensorflow/core/lib/gtl/array_slice_test.cc
+++ b/tensorflow/core/lib/gtl/array_slice_test.cc
@@ -20,11 +20,11 @@ limitations under the License.
#include <string>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/gtl/inlined_vector.h"
#include "tensorflow/core/lib/gtl/stl_util.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace gtl {
@@ -406,7 +406,7 @@ TEST(IntSlice, Equality) {
// Compile-asserts that the argument has the expected type.
template <typename Expected, typename T>
void CheckType(const T& value) {
- testing::StaticAssertTypeEq<Expected, T>();
+ ::testing::StaticAssertTypeEq<Expected, T>();
}
TEST(IntSlice, ExposesContainerTypesAndConsts) {
@@ -416,9 +416,9 @@ TEST(IntSlice, ExposesContainerTypesAndConsts) {
CheckType<IntSlice::const_iterator>(const_slice.end());
CheckType<IntSlice::const_reverse_iterator>(const_slice.rbegin());
CheckType<IntSlice::reverse_iterator>(slice.rend());
- testing::StaticAssertTypeEq<int, IntSlice::value_type>();
- testing::StaticAssertTypeEq<const int*, IntSlice::pointer>();
- testing::StaticAssertTypeEq<const int&, IntSlice::const_reference>();
+ ::testing::StaticAssertTypeEq<int, IntSlice::value_type>();
+ ::testing::StaticAssertTypeEq<const int*, IntSlice::pointer>();
+ ::testing::StaticAssertTypeEq<const int&, IntSlice::const_reference>();
EXPECT_EQ(static_cast<IntSlice::size_type>(-1), IntSlice::npos);
}
@@ -586,11 +586,11 @@ TEST(MutableIntSlice, ContainerWithShallowConstDataConversion) {
}
TEST(MutableIntSlice, TypedefsAndConstants) {
- testing::StaticAssertTypeEq<int, MutableIntSlice::value_type>();
- testing::StaticAssertTypeEq<int*, MutableIntSlice::pointer>();
- testing::StaticAssertTypeEq<const int*, MutableIntSlice::const_pointer>();
- testing::StaticAssertTypeEq<int&, MutableIntSlice::reference>();
- testing::StaticAssertTypeEq<const int&, MutableIntSlice::const_reference>();
+ ::testing::StaticAssertTypeEq<int, MutableIntSlice::value_type>();
+ ::testing::StaticAssertTypeEq<int*, MutableIntSlice::pointer>();
+ ::testing::StaticAssertTypeEq<const int*, MutableIntSlice::const_pointer>();
+ ::testing::StaticAssertTypeEq<int&, MutableIntSlice::reference>();
+ ::testing::StaticAssertTypeEq<const int&, MutableIntSlice::const_reference>();
EXPECT_EQ(static_cast<MutableIntSlice::size_type>(-1), MutableIntSlice::npos);
}
diff --git a/tensorflow/core/lib/gtl/edit_distance_test.cc b/tensorflow/core/lib/gtl/edit_distance_test.cc
index 1e9f19356a..3db9772af4 100644
--- a/tensorflow/core/lib/gtl/edit_distance_test.cc
+++ b/tensorflow/core/lib/gtl/edit_distance_test.cc
@@ -15,9 +15,9 @@ limitations under the License.
#include "tensorflow/core/lib/gtl/edit_distance.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/gtl/inlined_vector_test.cc b/tensorflow/core/lib/gtl/inlined_vector_test.cc
index d6fafc41d6..bedcd9539f 100644
--- a/tensorflow/core/lib/gtl/inlined_vector_test.cc
+++ b/tensorflow/core/lib/gtl/inlined_vector_test.cc
@@ -20,10 +20,10 @@ limitations under the License.
#include <string>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/gtl/int_type_test.cc b/tensorflow/core/lib/gtl/int_type_test.cc
index 44e1984544..cd14d26749 100644
--- a/tensorflow/core/lib/gtl/int_type_test.cc
+++ b/tensorflow/core/lib/gtl/int_type_test.cc
@@ -18,9 +18,9 @@ limitations under the License.
#include <memory>
#include <unordered_map>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/gtl/int_type.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/gtl/iterator_range_test.cc b/tensorflow/core/lib/gtl/iterator_range_test.cc
index 1a5a9ebafa..df7126ad97 100644
--- a/tensorflow/core/lib/gtl/iterator_range_test.cc
+++ b/tensorflow/core/lib/gtl/iterator_range_test.cc
@@ -16,9 +16,9 @@ limitations under the License.
#include "tensorflow/core/lib/gtl/iterator_range.h"
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace gtl {
diff --git a/tensorflow/core/lib/gtl/manual_constructor_test.cc b/tensorflow/core/lib/gtl/manual_constructor_test.cc
index 4416f781d6..bd0c626c0c 100644
--- a/tensorflow/core/lib/gtl/manual_constructor_test.cc
+++ b/tensorflow/core/lib/gtl/manual_constructor_test.cc
@@ -17,8 +17,8 @@ limitations under the License.
#include <stdint.h>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/lib/gtl/map_util_test.cc b/tensorflow/core/lib/gtl/map_util_test.cc
index a3b2dc015e..e8bf9c7d4a 100644
--- a/tensorflow/core/lib/gtl/map_util_test.cc
+++ b/tensorflow/core/lib/gtl/map_util_test.cc
@@ -20,7 +20,7 @@ limitations under the License.
#include <string>
#include "tensorflow/core/platform/port.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/gtl/top_n_test.cc b/tensorflow/core/lib/gtl/top_n_test.cc
index c4391baf05..92bc017bf2 100644
--- a/tensorflow/core/lib/gtl/top_n_test.cc
+++ b/tensorflow/core/lib/gtl/top_n_test.cc
@@ -20,11 +20,11 @@ limitations under the License.
#include <string>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/gtl/stl_util.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
namespace {
diff --git a/tensorflow/core/lib/hash/crc32c_test.cc b/tensorflow/core/lib/hash/crc32c_test.cc
index be02c5e86b..b500d9a8d4 100644
--- a/tensorflow/core/lib/hash/crc32c_test.cc
+++ b/tensorflow/core/lib/hash/crc32c_test.cc
@@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/lib/hash/crc32c.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace crc32c {
diff --git a/tensorflow/core/lib/hash/hash_test.cc b/tensorflow/core/lib/hash/hash_test.cc
index 358ffd39aa..2290f58d6c 100644
--- a/tensorflow/core/lib/hash/hash_test.cc
+++ b/tensorflow/core/lib/hash/hash_test.cc
@@ -15,9 +15,9 @@ limitations under the License.
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/hash/hash.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/histogram/histogram_test.cc b/tensorflow/core/lib/histogram/histogram_test.cc
index b1a63ee5c1..0771781cd9 100644
--- a/tensorflow/core/lib/histogram/histogram_test.cc
+++ b/tensorflow/core/lib/histogram/histogram_test.cc
@@ -15,9 +15,9 @@ limitations under the License.
#include "tensorflow/core/lib/histogram/histogram.h"
#include <float.h>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/summary.pb.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace histogram {
diff --git a/tensorflow/core/lib/io/inputbuffer_test.cc b/tensorflow/core/lib/io/inputbuffer_test.cc
index d298c3d25f..98c4c20d4f 100644
--- a/tensorflow/core/lib/io/inputbuffer_test.cc
+++ b/tensorflow/core/lib/io/inputbuffer_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include "tensorflow/core/public/env.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
diff --git a/tensorflow/core/lib/io/match_test.cc b/tensorflow/core/lib/io/match_test.cc
index 816f82c22d..741c37c471 100644
--- a/tensorflow/core/lib/io/match_test.cc
+++ b/tensorflow/core/lib/io/match_test.cc
@@ -13,10 +13,9 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
+#include "tensorflow/core/lib/io/match.h"
#include <algorithm>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/status_test_util.h"
-#include "tensorflow/core/lib/io/match.h"
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/test.h"
diff --git a/tensorflow/core/lib/io/path_test.cc b/tensorflow/core/lib/io/path_test.cc
index caea75ba81..cc8342fca5 100644
--- a/tensorflow/core/lib/io/path_test.cc
+++ b/tensorflow/core/lib/io/path_test.cc
@@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/lib/io/path.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace io {
diff --git a/tensorflow/core/lib/io/recordio_test.cc b/tensorflow/core/lib/io/recordio_test.cc
index ae55af5983..30c0c36e0a 100644
--- a/tensorflow/core/lib/io/recordio_test.cc
+++ b/tensorflow/core/lib/io/recordio_test.cc
@@ -13,14 +13,14 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#include "tensorflow/core/lib/io/record_reader.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/coding.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/hash/crc32c.h"
+#include "tensorflow/core/lib/io/record_reader.h"
#include "tensorflow/core/lib/io/record_writer.h"
#include "tensorflow/core/lib/random/simple_philox.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/env.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/io/table_test.cc b/tensorflow/core/lib/io/table_test.cc
index c017e68208..dcc1eb5558 100644
--- a/tensorflow/core/lib/io/table_test.cc
+++ b/tensorflow/core/lib/io/table_test.cc
@@ -17,7 +17,6 @@ limitations under the License.
#include <map>
#include <string>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/io/block.h"
#include "tensorflow/core/lib/io/block_builder.h"
diff --git a/tensorflow/core/lib/jpeg/jpeg_handle.h b/tensorflow/core/lib/jpeg/jpeg_handle.h
index 8e5d772d27..461542cdb3 100644
--- a/tensorflow/core/lib/jpeg/jpeg_handle.h
+++ b/tensorflow/core/lib/jpeg/jpeg_handle.h
@@ -19,13 +19,7 @@ limitations under the License.
#ifndef TENSORFLOW_LIB_JPEG_JPEG_HANDLE_H_
#define TENSORFLOW_LIB_JPEG_JPEG_HANDLE_H_
-extern "C" {
-#include "third_party/jpeg/jerror.h"
-#include "third_party/jpeg/jinclude.h"
-#include "third_party/jpeg/jpeglib.h"
-#include "third_party/jpeg/transupp.h" // for rotations
-}
-
+#include "tensorflow/core/platform/jpeg.h"
#include "tensorflow/core/platform/port.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc b/tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc
index 86530138ba..2927d1b3f7 100644
--- a/tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc
+++ b/tensorflow/core/lib/jpeg/jpeg_mem_unittest.cc
@@ -22,10 +22,10 @@ limitations under the License.
#include <memory>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/jpeg/jpeg_handle.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/env.h"
#include "tensorflow/core/lib/core/casts.h"
diff --git a/tensorflow/core/lib/png/png_io.cc b/tensorflow/core/lib/png/png_io.cc
index 4f9f19997d..49f247cab3 100644
--- a/tensorflow/core/lib/png/png_io.cc
+++ b/tensorflow/core/lib/png/png_io.cc
@@ -20,13 +20,13 @@ limitations under the License.
#include <string>
#include <utility>
#include <vector>
-// NOTE(skal): we don't '#include <setjmp.h>' before png/png.h as it otherwise
+// NOTE(skal): we don't '#include <setjmp.h>' before png.h as it otherwise
// provokes a compile error. We instead let png.h include what is needed.
-#include "third_party/png/png.h"
#include "tensorflow/core/lib/core/casts.h"
#include "tensorflow/core/lib/png/png_io.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/png.h"
#include "tensorflow/core/platform/port.h" // endian
namespace tensorflow {
diff --git a/tensorflow/core/lib/png/png_io.h b/tensorflow/core/lib/png/png_io.h
index 8e0fcd8cea..0c73626635 100644
--- a/tensorflow/core/lib/png/png_io.h
+++ b/tensorflow/core/lib/png/png_io.h
@@ -35,8 +35,8 @@ limitations under the License.
#include <utility>
#include <vector>
-#include "third_party/png/png.h"
#include "tensorflow/core/lib/core/stringpiece.h"
+#include "tensorflow/core/platform/png.h"
namespace tensorflow {
namespace png {
diff --git a/tensorflow/core/lib/random/distribution_sampler_test.cc b/tensorflow/core/lib/random/distribution_sampler_test.cc
index f2af56ce3d..94dccb8daa 100644
--- a/tensorflow/core/lib/random/distribution_sampler_test.cc
+++ b/tensorflow/core/lib/random/distribution_sampler_test.cc
@@ -19,7 +19,6 @@ limitations under the License.
#include <memory>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/port.h"
diff --git a/tensorflow/core/lib/random/philox_random_test.cc b/tensorflow/core/lib/random/philox_random_test.cc
index 79a1559628..51b9cdd6bd 100644
--- a/tensorflow/core/lib/random/philox_random_test.cc
+++ b/tensorflow/core/lib/random/philox_random_test.cc
@@ -21,11 +21,11 @@ limitations under the License.
#include <unordered_map>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/random/philox_random_test_utils.h"
#include "tensorflow/core/lib/random/random.h"
#include "tensorflow/core/lib/random/random_distributions.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace random {
diff --git a/tensorflow/core/lib/random/random_distributions_test.cc b/tensorflow/core/lib/random/random_distributions_test.cc
index 78ddc53630..4d3e4a5cdc 100644
--- a/tensorflow/core/lib/random/random_distributions_test.cc
+++ b/tensorflow/core/lib/random/random_distributions_test.cc
@@ -21,11 +21,11 @@ limitations under the License.
#include <unordered_map>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/random/philox_random.h"
#include "tensorflow/core/lib/random/philox_random_test_utils.h"
#include "tensorflow/core/lib/random/random.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace random {
diff --git a/tensorflow/core/lib/random/random_test.cc b/tensorflow/core/lib/random/random_test.cc
index a42d9c1238..9da0b1b8be 100644
--- a/tensorflow/core/lib/random/random_test.cc
+++ b/tensorflow/core/lib/random/random_test.cc
@@ -16,8 +16,8 @@ limitations under the License.
#include "tensorflow/core/lib/random/random.h"
#include <set>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace random {
diff --git a/tensorflow/core/lib/random/simple_philox_test.cc b/tensorflow/core/lib/random/simple_philox_test.cc
index 8897408b6f..60f7978aaf 100644
--- a/tensorflow/core/lib/random/simple_philox_test.cc
+++ b/tensorflow/core/lib/random/simple_philox_test.cc
@@ -18,9 +18,9 @@ limitations under the License.
#include <set>
#include <string>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace random {
diff --git a/tensorflow/core/lib/random/weighted_picker_test.cc b/tensorflow/core/lib/random/weighted_picker_test.cc
index a6a7f5b440..dff4836d14 100644
--- a/tensorflow/core/lib/random/weighted_picker_test.cc
+++ b/tensorflow/core/lib/random/weighted_picker_test.cc
@@ -18,7 +18,6 @@ limitations under the License.
#include <string.h>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/macros.h"
diff --git a/tensorflow/core/lib/strings/numbers_test.cc b/tensorflow/core/lib/strings/numbers_test.cc
index e89302ec9f..e583ffedb2 100644
--- a/tensorflow/core/lib/strings/numbers_test.cc
+++ b/tensorflow/core/lib/strings/numbers_test.cc
@@ -16,7 +16,7 @@ limitations under the License.
#include "tensorflow/core/lib/strings/numbers.h"
#include <string>
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace strings {
diff --git a/tensorflow/core/lib/strings/ordered_code_test.cc b/tensorflow/core/lib/strings/ordered_code_test.cc
index e215f230fe..634f87608c 100644
--- a/tensorflow/core/lib/strings/ordered_code_test.cc
+++ b/tensorflow/core/lib/strings/ordered_code_test.cc
@@ -20,11 +20,11 @@ limitations under the License.
#include <limits>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/random/simple_philox.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/strings/str_util_test.cc b/tensorflow/core/lib/strings/str_util_test.cc
index d80a30a1a1..0ed9aa8b80 100644
--- a/tensorflow/core/lib/strings/str_util_test.cc
+++ b/tensorflow/core/lib/strings/str_util_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/lib/strings/str_util.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/lib/strings/strcat_test.cc b/tensorflow/core/lib/strings/strcat_test.cc
index 642e5bce8b..5ccba872ac 100644
--- a/tensorflow/core/lib/strings/strcat_test.cc
+++ b/tensorflow/core/lib/strings/strcat_test.cc
@@ -17,9 +17,9 @@ limitations under the License.
#include <string>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/strings/stringprintf.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace strings {
diff --git a/tensorflow/core/lib/strings/stringprintf_test.cc b/tensorflow/core/lib/strings/stringprintf_test.cc
index 68def9f28b..575c509494 100644
--- a/tensorflow/core/lib/strings/stringprintf_test.cc
+++ b/tensorflow/core/lib/strings/stringprintf_test.cc
@@ -17,7 +17,7 @@ limitations under the License.
#include <string>
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace strings {
diff --git a/tensorflow/core/ops/io_ops.cc b/tensorflow/core/ops/io_ops.cc
index eba8ae6a8c..e6d18c9bb8 100644
--- a/tensorflow/core/ops/io_ops.cc
+++ b/tensorflow/core/ops/io_ops.cc
@@ -14,7 +14,6 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/framework/op.h"
-#include "tensorflow/core/platform/port.h"
namespace tensorflow {
diff --git a/tensorflow/core/platform/stream_executor_util.h b/tensorflow/core/platform/cuda.h
index aff1c8d1a6..636bc540c8 100644
--- a/tensorflow/core/platform/stream_executor_util.h
+++ b/tensorflow/core/platform/cuda.h
@@ -13,15 +13,15 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#ifndef TENSORFLOW_PLATFORM_STREAM_EXECUTOR_UTIL_H_
-#define TENSORFLOW_PLATFORM_STREAM_EXECUTOR_UTIL_H_
+#ifndef TENSORFLOW_PLATFORM_CUDA_H_
+#define TENSORFLOW_PLATFORM_CUDA_H_
-#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/platform.h"
#if defined(PLATFORM_GOOGLE)
-#include "tensorflow/core/platform/google/stream_executor_util.h"
+#include "tensorflow/core/platform/google/build_config/cuda.h"
#else
-#include "tensorflow/core/platform/default/stream_executor_util.h"
+#include "tensorflow/stream_executor/cuda/cuda_activation.h"
#endif
-#endif // TENSORFLOW_PLATFORM_STREAM_EXECUTOR_UTIL_H_
+#endif // TENSORFLOW_PLATFORM_CUDA_H_
diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl
index af25ef3f35..a5932cf0e1 100644
--- a/tensorflow/core/platform/default/build_config.bzl
+++ b/tensorflow/core/platform/default/build_config.bzl
@@ -60,6 +60,9 @@ def tf_additional_lib_srcs():
"platform/posix/*.cc",
]
+def tf_additional_stream_executor_srcs():
+ return ["platform/default/stream_executor.h"]
+
def tf_additional_test_srcs():
return ["platform/default/test_benchmark.cc"]
diff --git a/tensorflow/core/platform/default/stream_executor_util.h b/tensorflow/core/platform/default/stream_executor.h
index 3f58c7900a..ac61d46ee7 100644
--- a/tensorflow/core/platform/default/stream_executor_util.h
+++ b/tensorflow/core/platform/default/stream_executor.h
@@ -13,15 +13,23 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
-#ifndef TENSORFLOW_PLATFORM_DEFAULT_STREAM_EXECUTOR_UTIL_H_
-#define TENSORFLOW_PLATFORM_DEFAULT_STREAM_EXECUTOR_UTIL_H_
+#ifndef TENSORFLOW_PLATFORM_DEFAULT_STREAM_EXECUTOR_H_
+#define TENSORFLOW_PLATFORM_DEFAULT_STREAM_EXECUTOR_H_
-// IWYU pragma: private, include "third_party/tensorflow/core/platform/stream_executor_util.h"
-// IWYU pragma: friend third_party/tensorflow/core/platform/stream_executor_util.h
+// IWYU pragma: private, include "third_party/tensorflow/core/platform/stream_executor.h"
+// IWYU pragma: friend third_party/tensorflow/core/platform/stream_executor.h
-#include "perftools/gputools/executor/lib/status.h"
+#include "tensorflow/stream_executor/device_memory.h"
+#include "tensorflow/stream_executor/dnn.h"
+#include "tensorflow/stream_executor/event.h"
+#include "tensorflow/stream_executor/lib/status.h"
+#include "tensorflow/stream_executor/multi_platform_manager.h"
+#include "tensorflow/stream_executor/platform.h"
+#include "tensorflow/stream_executor/scratch_allocator.h"
+#include "tensorflow/stream_executor/stream.h"
+#include "tensorflow/stream_executor/stream_executor.h"
- namespace tensorflow {
+namespace tensorflow {
namespace gpu = ::perftools::gputools;
@@ -34,4 +42,4 @@ inline Status FromStreamExecutorStatus(
} // namespace tensorflow
-#endif // TENSORFLOW_PLATFORM_DEFAULT_STREAM_EXECUTOR_UTIL_H_
+#endif // TENSORFLOW_PLATFORM_DEFAULT_STREAM_EXECUTOR_H_
diff --git a/tensorflow/core/platform/env_test.cc b/tensorflow/core/platform/env_test.cc
index 02126014d9..a817ef5735 100644
--- a/tensorflow/core/platform/env_test.cc
+++ b/tensorflow/core/platform/env_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/public/env.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/test.h"
diff --git a/tensorflow/core/platform/integral_types_test.cc b/tensorflow/core/platform/integral_types_test.cc
index a06ff567dc..5541184104 100644
--- a/tensorflow/core/platform/integral_types_test.cc
+++ b/tensorflow/core/platform/integral_types_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/platform/port.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/platform/jpeg.h b/tensorflow/core/platform/jpeg.h
new file mode 100644
index 0000000000..584e0c467b
--- /dev/null
+++ b/tensorflow/core/platform/jpeg.h
@@ -0,0 +1,35 @@
+/* Copyright 2015 Google Inc. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+#ifndef TENSORFLOW_CORE_PLATFORM_JPEG_H_
+#define TENSORFLOW_CORE_PLATFORM_JPEG_H_
+
+#include "tensorflow/core/platform/platform.h"
+
+#if defined(PLATFORM_GOOGLE)
+#include "tensorflow/core/platform/google/build_config/jpeg.h"
+#elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \
+ defined(PLATFORM_GOOGLE_ANDROID)
+extern "C" {
+#include "external/jpeg_archive/jpeg-9a/jerror.h"
+#include "external/jpeg_archive/jpeg-9a/jinclude.h"
+#include "external/jpeg_archive/jpeg-9a/jpeglib.h"
+#include "external/jpeg_archive/jpeg-9a/transupp.h" // for rotations
+}
+#else
+#error Define the appropriate PLATFORM_<foo> macro for this platform
+#endif
+
+#endif // TENSORFLOW_CORE_PLATFORM_JPEG_H_
diff --git a/tensorflow/core/platform/logging.h b/tensorflow/core/platform/logging.h
index 2c0c6d3372..934623584a 100644
--- a/tensorflow/core/platform/logging.h
+++ b/tensorflow/core/platform/logging.h
@@ -19,7 +19,7 @@ limitations under the License.
#include "tensorflow/core/platform/platform.h" // To pick up PLATFORM_define
#if defined(PLATFORM_GOOGLE) || defined(PLATFORM_GOOGLE_ANDROID)
-#include "base/logging.h"
+#include "tensorflow/core/platform/google/build_config/logging.h"
#else
#include "tensorflow/core/platform/default/logging.h"
#endif
diff --git a/tensorflow/core/platform/logging_test.cc b/tensorflow/core/platform/logging_test.cc
index 92bef1b2d5..32e43aeb5b 100644
--- a/tensorflow/core/platform/logging_test.cc
+++ b/tensorflow/core/platform/logging_test.cc
@@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/platform/logging.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/platform/mem.h b/tensorflow/core/platform/mem.h
index cd864d51b5..4c580e5fe2 100644
--- a/tensorflow/core/platform/mem.h
+++ b/tensorflow/core/platform/mem.h
@@ -22,7 +22,7 @@ limitations under the License.
// Include appropriate platform-dependent implementation of
// TF_ANNOTATE_MEMORY_IS_INITIALIZED.
#if defined(PLATFORM_GOOGLE)
-#include "tensorflow/core/platform/google/dynamic_annotations.h"
+#include "tensorflow/core/platform/google/build_config/dynamic_annotations.h"
#elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \
defined(PLATFORM_GOOGLE_ANDROID)
#include "tensorflow/core/platform/default/dynamic_annotations.h"
diff --git a/tensorflow/core/platform/png.h b/tensorflow/core/platform/png.h
new file mode 100644
index 0000000000..66ae2fc6d6
--- /dev/null
+++ b/tensorflow/core/platform/png.h
@@ -0,0 +1,30 @@
+/* Copyright 2015 Google Inc. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+#ifndef TENSORFLOW_PLATFORM_PNG_H_
+#define TENSORFLOW_PLATFORM_PNG_H_
+
+#include "tensorflow/core/platform/platform.h"
+
+#if defined(PLATFORM_GOOGLE)
+#include "tensorflow/core/platform/google/build_config/png.h"
+#elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID) || \
+ defined(PLATFORM_GOOGLE_ANDROID)
+#include "external/png_archive/libpng-1.2.53/png.h"
+#else
+#error Define the appropriate PLATFORM_<foo> macro for this platform
+#endif
+
+#endif // TENSORFLOW_PLATFORM_PNG_H_
diff --git a/tensorflow/core/platform/port_test.cc b/tensorflow/core/platform/port_test.cc
index 1e1df6e7ee..9d6661f7b1 100644
--- a/tensorflow/core/platform/port_test.cc
+++ b/tensorflow/core/platform/port_test.cc
@@ -14,10 +14,10 @@ limitations under the License.
==============================================================================*/
#include <condition_variable>
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/platform/mem.h"
#include "tensorflow/core/platform/mutex.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace port {
diff --git a/tensorflow/core/platform/protobuf.h b/tensorflow/core/platform/protobuf.h
index 07826acb8f..c3299ec8a3 100644
--- a/tensorflow/core/platform/protobuf.h
+++ b/tensorflow/core/platform/protobuf.h
@@ -16,17 +16,19 @@ limitations under the License.
#ifndef TENSORFLOW_PLATFORM_PROTOBUF_H_
#define TENSORFLOW_PLATFORM_PROTOBUF_H_
+#include "tensorflow/core/platform/platform.h"
+#include "tensorflow/core/platform/types.h"
+
// Import whatever namespace protobuf comes from into the
// ::tensorflow::protobuf namespace.
//
// TensorFlow code should use the ::tensorflow::protobuf namespace to
// refer to all protobuf APIs.
-#include "tensorflow/core/platform/port.h"
#if defined(PLATFORM_GOOGLE)
-#include "tensorflow/core/platform/google/protobuf.h"
+#include "tensorflow/core/platform/google/build_config/protobuf.h"
#elif defined(PLATFORM_GOOGLE_ANDROID)
-#include "tensorflow/core/platform/google/protobuf_android.h"
+#include "tensorflow/core/platform/google/build_config/protobuf_android.h"
#else
#include "tensorflow/core/platform/default/protobuf.h"
#endif
diff --git a/tensorflow/core/platform/regexp.h b/tensorflow/core/platform/regexp.h
index 76f1aa1317..f2ab6097ab 100644
--- a/tensorflow/core/platform/regexp.h
+++ b/tensorflow/core/platform/regexp.h
@@ -16,17 +16,18 @@ limitations under the License.
#ifndef TENSORFLOW_PLATFORM_REGEXP_H_
#define TENSORFLOW_PLATFORM_REGEXP_H_
+#include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/port.h"
#if defined(PLATFORM_GOOGLE) || defined(PLATFORM_GOOGLE_ANDROID)
-#include "third_party/re2/re2.h"
+#include "tensorflow/core/platform/google/build_config/re2.h"
namespace tensorflow {
typedef ::StringPiece RegexpStringPiece;
} // namespace tensorflow
#else
-#include "third_party/re2/re2/re2.h"
+#include "external/re2/re2/re2.h"
namespace tensorflow {
typedef re2::StringPiece RegexpStringPiece;
} // namespace tensorflow
diff --git a/tensorflow/core/platform/stream_executor.h b/tensorflow/core/platform/stream_executor.h
new file mode 100644
index 0000000000..60b6ac47bd
--- /dev/null
+++ b/tensorflow/core/platform/stream_executor.h
@@ -0,0 +1,27 @@
+/* Copyright 2015 Google Inc. All Rights Reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+==============================================================================*/
+
+#ifndef TENSORFLOW_PLATFORM_STREAM_EXECUTOR_H_
+#define TENSORFLOW_PLATFORM_STREAM_EXECUTOR_H_
+
+#include "tensorflow/core/platform/platform.h"
+
+#if defined(PLATFORM_GOOGLE)
+#include "tensorflow/core/platform/google/stream_executor.h"
+#else
+#include "tensorflow/core/platform/default/stream_executor.h"
+#endif
+
+#endif // TENSORFLOW_PLATFORM_STREAM_EXECUTOR_H_
diff --git a/tensorflow/core/platform/tensor_coding.h b/tensorflow/core/platform/tensor_coding.h
index 37531a2d69..7b39d07d12 100644
--- a/tensorflow/core/platform/tensor_coding.h
+++ b/tensorflow/core/platform/tensor_coding.h
@@ -20,6 +20,7 @@ limitations under the License.
#include <string>
#include "tensorflow/core/lib/core/refcount.h"
#include "tensorflow/core/lib/core/stringpiece.h"
+#include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/port.h"
#ifdef PLATFORM_GOOGLE
diff --git a/tensorflow/core/platform/test.cc b/tensorflow/core/platform/test.cc
index f95112718b..9649d39ca3 100644
--- a/tensorflow/core/platform/test.cc
+++ b/tensorflow/core/platform/test.cc
@@ -14,10 +14,11 @@ limitations under the License.
==============================================================================*/
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/types.h"
#if defined(PLATFORM_GOOGLE) || defined(PLATFORM_POSIX_ANDROID) || \
defined(PLATFORM_GOOGLE_ANDROID)
-#include "testing/base/public/googletest.h"
+#include "tensorflow/core/platform/google/build_config/googletest.h"
#endif
namespace tensorflow {
diff --git a/tensorflow/core/platform/test.h b/tensorflow/core/platform/test.h
index b04db2f0db..50211f93b3 100644
--- a/tensorflow/core/platform/test.h
+++ b/tensorflow/core/platform/test.h
@@ -16,8 +16,15 @@ limitations under the License.
#ifndef TENSORFLOW_PLATFORM_TEST_H_
#define TENSORFLOW_PLATFORM_TEST_H_
+#include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/types.h"
+#if defined(PLATFORM_GOOGLE) || defined(PLATFORM_GOOGLE_ANDROID)
+#include "tensorflow/core/platform/google/build_config/gunit.h"
+#else
+#include <gtest/gtest.h>
+#endif
+
namespace tensorflow {
namespace testing {
diff --git a/tensorflow/core/platform/test_benchmark.h b/tensorflow/core/platform/test_benchmark.h
index e1ec9196a0..913ed3b6a9 100644
--- a/tensorflow/core/platform/test_benchmark.h
+++ b/tensorflow/core/platform/test_benchmark.h
@@ -18,10 +18,11 @@ limitations under the License.
#define TENSORFLOW_PLATFORM_TEST_BENCHMARK_H_
#include "tensorflow/core/platform/macros.h"
+#include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/port.h"
#if defined(PLATFORM_GOOGLE)
-#include "testing/base/public/benchmark.h"
+#include "tensorflow/core/platform/google/build_config/benchmark.h"
#else
#define BENCHMARK(n) \
diff --git a/tensorflow/core/platform/test_main.cc b/tensorflow/core/platform/test_main.cc
index 8a6a5ce7b9..f7cfe981b0 100644
--- a/tensorflow/core/platform/test_main.cc
+++ b/tensorflow/core/platform/test_main.cc
@@ -18,15 +18,16 @@ limitations under the License.
// the --benchmark_filter flag which specifies which benchmarks to run,
// we will either run benchmarks or run the gtest tests in the program.
-#include <iostream>
-
-#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/platform.h"
#if defined(PLATFORM_GOOGLE) || defined(__ANDROID__)
// main() is supplied by gunit_main
#else
-#include "gtest/gtest.h"
+
+#include <iostream>
+
#include "tensorflow/core/lib/core/stringpiece.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
GTEST_API_ int main(int argc, char** argv) {
diff --git a/tensorflow/core/platform/thread_annotations.h b/tensorflow/core/platform/thread_annotations.h
index fd3efb1dee..9af87e408e 100644
--- a/tensorflow/core/platform/thread_annotations.h
+++ b/tensorflow/core/platform/thread_annotations.h
@@ -19,7 +19,7 @@ limitations under the License.
#include "tensorflow/core/platform/port.h"
#if defined(PLATFORM_GOOGLE) || defined(PLATFORM_GOOGLE_ANDROID)
-#include "base/thread_annotations.h"
+#include "tensorflow/core/platform/google/build_config/thread_annotations.h"
#elif defined(PLATFORM_POSIX) || defined(PLATFORM_POSIX_ANDROID)
#include "tensorflow/core/platform/default/thread_annotations.h"
#else
diff --git a/tensorflow/core/platform/tracing.h b/tensorflow/core/platform/tracing.h
index 78c516ede1..0e334bef4d 100644
--- a/tensorflow/core/platform/tracing.h
+++ b/tensorflow/core/platform/tracing.h
@@ -26,6 +26,7 @@ limitations under the License.
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/mutex.h"
+#include "tensorflow/core/platform/platform.h"
#include "tensorflow/core/platform/types.h"
namespace tensorflow {
diff --git a/tensorflow/core/platform/types.h b/tensorflow/core/platform/types.h
index 3e637ff125..e0f022e5be 100644
--- a/tensorflow/core/platform/types.h
+++ b/tensorflow/core/platform/types.h
@@ -32,6 +32,8 @@ limitations under the License.
namespace tensorflow {
// Define tensorflow::string to refer to appropriate platform specific type.
+// TODO(josh11b): Move this into the platform/*/integral_types.h files
+// above, and rename them platform/*/types.h.
#if defined(PLATFORM_GOOGLE)
using ::string;
#else
diff --git a/tensorflow/core/util/bcast_test.cc b/tensorflow/core/util/bcast_test.cc
index a00ab7e766..f2c0950975 100644
--- a/tensorflow/core/util/bcast_test.cc
+++ b/tensorflow/core/util/bcast_test.cc
@@ -15,9 +15,9 @@ limitations under the License.
#include "tensorflow/core/util/bcast.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/util/device_name_utils_test.cc b/tensorflow/core/util/device_name_utils_test.cc
index 87a7a3c8fc..2751cb338e 100644
--- a/tensorflow/core/util/device_name_utils_test.cc
+++ b/tensorflow/core/util/device_name_utils_test.cc
@@ -15,9 +15,9 @@ limitations under the License.
#include "tensorflow/core/util/device_name_utils.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/core/status_test_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {
diff --git a/tensorflow/core/util/saved_tensor_slice_util_test.cc b/tensorflow/core/util/saved_tensor_slice_util_test.cc
index 6774ec1ea7..ea46c71153 100644
--- a/tensorflow/core/util/saved_tensor_slice_util_test.cc
+++ b/tensorflow/core/util/saved_tensor_slice_util_test.cc
@@ -15,10 +15,10 @@ limitations under the License.
#include "tensorflow/core/util/saved_tensor_slice_util.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/protobuf.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
diff --git a/tensorflow/core/util/sparse/sparse_tensor_test.cc b/tensorflow/core/util/sparse/sparse_tensor_test.cc
index 21390090a4..93bf17fd54 100644
--- a/tensorflow/core/util/sparse/sparse_tensor_test.cc
+++ b/tensorflow/core/util/sparse/sparse_tensor_test.cc
@@ -18,10 +18,10 @@ limitations under the License.
#include <string>
#include <vector>
-#include "testing/base/public/gunit.h"
#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor"
#include "tensorflow/core/framework/tensor_types.h"
#include "tensorflow/core/lib/strings/str_util.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/tensor.h"
namespace tensorflow {
diff --git a/tensorflow/core/util/tensor_slice_reader_test.cc b/tensorflow/core/util/tensor_slice_reader_test.cc
index 1048be0f02..502126d8f6 100644
--- a/tensorflow/core/util/tensor_slice_reader_test.cc
+++ b/tensorflow/core/util/tensor_slice_reader_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/util/tensor_slice_reader.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/framework/types.h"
#include "tensorflow/core/lib/core/status_test_util.h"
#include "tensorflow/core/lib/core/stringpiece.h"
diff --git a/tensorflow/core/util/tensor_slice_set_test.cc b/tensorflow/core/util/tensor_slice_set_test.cc
index ab08560c9a..999a544409 100644
--- a/tensorflow/core/util/tensor_slice_set_test.cc
+++ b/tensorflow/core/util/tensor_slice_set_test.cc
@@ -15,8 +15,8 @@ limitations under the License.
#include "tensorflow/core/util/tensor_slice_set.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/platform/logging.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/public/status.h"
namespace tensorflow {
diff --git a/tensorflow/core/util/tensor_slice_util_test.cc b/tensorflow/core/util/tensor_slice_util_test.cc
index 7899c71681..907e372ce7 100644
--- a/tensorflow/core/util/tensor_slice_util_test.cc
+++ b/tensorflow/core/util/tensor_slice_util_test.cc
@@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/util/tensor_slice_util.h"
-#include "testing/base/public/gunit.h"
+#include "tensorflow/core/platform/test.h"
namespace tensorflow {
namespace {
diff --git a/tensorflow/core/util/tensor_slice_writer_test.cc b/tensorflow/core/util/tensor_slice_writer_test.cc
index 993cf84714..625ad1b212 100644
--- a/tensorflow/core/util/tensor_slice_writer_test.cc
+++ b/tensorflow/core/util/tensor_slice_writer_test.cc
@@ -15,7 +15,6 @@ limitations under the License.
#include "tensorflow/core/util/tensor_slice_writer.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/stringpiece.h"
#include "tensorflow/core/lib/io/path.h"
#include "tensorflow/core/platform/logging.h"
diff --git a/tensorflow/core/util/work_sharder_test.cc b/tensorflow/core/util/work_sharder_test.cc
index 88303a2d31..cf727403fe 100644
--- a/tensorflow/core/util/work_sharder_test.cc
+++ b/tensorflow/core/util/work_sharder_test.cc
@@ -15,11 +15,11 @@ limitations under the License.
#include "tensorflow/core/util/work_sharder.h"
-#include "testing/base/public/gunit.h"
#include "tensorflow/core/lib/core/threadpool.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/platform/port.h"
+#include "tensorflow/core/platform/test.h"
#include "tensorflow/core/platform/test_benchmark.h"
namespace tensorflow {