Automated g4 rollback of changelist 284913256.
PiperOrigin-RevId: 285053504
Change-Id: I59a95ab52ceb66b24914e6ff360e384d2974c2ca
diff --git a/tensorflow/core/platform/BUILD b/tensorflow/core/platform/BUILD
index b5d5aa7..0acc2f5 100644
--- a/tensorflow/core/platform/BUILD
+++ b/tensorflow/core/platform/BUILD
@@ -14,17 +14,13 @@
"tf_additional_tensor_coding_deps",
"tf_additional_test_srcs",
"tf_fingerprint_deps",
- "tf_protobuf_compiler_deps",
- "tf_protobuf_deps",
-)
-load(
- "//tensorflow/core/platform/default:build_refactor.bzl",
- "tf_instantiate_platform_libraries",
"tf_legacy_srcs_no_runtime_google",
"tf_logging_deps",
- "tf_mobile_aware_deps",
"tf_monitoring_deps",
- "tf_platform_helper_deps",
+ "tf_platform_deps",
+ "tf_protobuf_compiler_deps",
+ "tf_protobuf_deps",
+ "tf_windows_aware_platform_deps",
)
load(
"//tensorflow:tensorflow.bzl",
@@ -44,39 +40,6 @@
licenses = ["notice"], # Apache 2.0
)
-# Note(bmzhao): These are temporary BUILD rule helpers for
-# platform-specific library dependencies. These temporarily
-# exist to allow us incrementally add granular targets
-# to tf/core/platform/BUILD. We will remove these helpers,
-# after we finish refactoring tf/core/platform/BUILD.
-tf_instantiate_platform_libraries(names = [
- "context",
- "cord",
- "cuda_libdevice_path",
- "dynamic_annotations",
- "env",
- "env_time",
- "human_readable_json",
- "logging",
- "load_library",
- "monitoring",
- "mutex",
- "net",
- "notification",
- "platform_port",
- "rocm_rocdl_path",
- "stacktrace",
- "stacktrace_handler",
- "strong_hash",
- "subprocess",
- "test",
- "test_benchmark",
- "tracing",
- "types",
- "unbounded_work_queue",
- "wide_char",
-])
-
cc_library(
name = "abi",
srcs = ["abi.cc"],
@@ -123,8 +86,7 @@
cc_library(
name = "context",
textual_hdrs = ["context.h"],
- # See call to tf_instantiate_platform_libraries() above.
- deps = tf_mobile_aware_deps("context_impl"),
+ deps = tf_platform_deps("context"),
)
cc_library(
@@ -132,7 +94,7 @@
hdrs = ["cord.h"],
deps = [
":platform",
- ] + tf_mobile_aware_deps("cord_impl"),
+ ] + tf_platform_deps("cord"),
)
cc_library(
@@ -158,7 +120,7 @@
cc_library(
name = "cuda_libdevice_path",
textual_hdrs = ["cuda_libdevice_path.h"],
- deps = tf_mobile_aware_deps("cuda_libdevice_path_impl"),
+ deps = tf_platform_deps("cuda_libdevice_path"),
)
cc_library(
@@ -179,7 +141,7 @@
hdrs = ["dynamic_annotations.h"],
deps = [
":platform",
- ] + tf_mobile_aware_deps("dynamic_annotations_impl"),
+ ] + tf_platform_deps("dynamic_annotations"),
)
cc_library(
@@ -190,13 +152,13 @@
"file_system_helper.h",
"threadpool.h",
],
- deps = tf_platform_helper_deps("env_impl"),
+ deps = tf_windows_aware_platform_deps("env"),
)
cc_library(
name = "env_time",
textual_hdrs = ["env_time.h"],
- deps = tf_platform_helper_deps("env_time_impl"),
+ deps = tf_windows_aware_platform_deps("env_time"),
)
cc_library(
@@ -262,7 +224,7 @@
cc_library(
name = "human_readable_json",
textual_hdrs = ["human_readable_json.h"],
- deps = tf_mobile_aware_deps("human_readable_json_impl"),
+ deps = tf_platform_deps("human_readable_json"),
)
cc_library(
@@ -276,7 +238,7 @@
cc_library(
name = "load_library",
textual_hdrs = ["load_library.h"],
- deps = tf_platform_helper_deps("load_library_impl"),
+ deps = tf_windows_aware_platform_deps("load_library"),
)
cc_library(
@@ -313,13 +275,13 @@
cc_library(
name = "mutex",
textual_hdrs = ["mutex.h"],
- deps = tf_mobile_aware_deps("mutex_impl"),
+ deps = tf_platform_deps("mutex"),
)
cc_library(
name = "net",
textual_hdrs = ["net.h"],
- deps = tf_platform_helper_deps("net_impl"),
+ deps = tf_windows_aware_platform_deps("net"),
)
cc_library(
@@ -327,7 +289,7 @@
hdrs = ["notification.h"],
deps = [
":platform",
- ] + tf_mobile_aware_deps("notification_impl"),
+ ] + tf_platform_deps("notification"),
)
cc_library(
@@ -384,7 +346,7 @@
"numa.h",
"snappy.h",
],
- deps = tf_platform_helper_deps("platform_port_impl"),
+ deps = tf_windows_aware_platform_deps("platform_port"),
)
cc_library(
@@ -482,7 +444,7 @@
cc_library(
name = "rocm_rocdl_path",
textual_hdrs = ["rocm_rocdl_path.h"],
- deps = tf_mobile_aware_deps("rocm_rocdl_path_impl"),
+ deps = tf_platform_deps("rocm_rocdl_path"),
)
cc_library(
@@ -520,7 +482,7 @@
hdrs = ["stacktrace.h"],
deps = [
":platform",
- ] + tf_platform_helper_deps("stacktrace_impl"),
+ ] + tf_windows_aware_platform_deps("stacktrace"),
)
filegroup(
@@ -537,7 +499,7 @@
cc_library(
name = "stacktrace_handler",
textual_hdrs = ["stacktrace_handler.h"],
- deps = tf_platform_helper_deps("stacktrace_handler_impl"),
+ deps = tf_windows_aware_platform_deps("stacktrace_handler"),
)
cc_library(
@@ -610,7 +572,7 @@
deps = [
":platform",
":types",
- ] + tf_mobile_aware_deps("strong_hash_impl"),
+ ] + tf_platform_deps("strong_hash"),
)
cc_library(
@@ -618,7 +580,7 @@
textual_hdrs = [
"subprocess.h",
],
- deps = tf_platform_helper_deps("subprocess_impl"),
+ deps = tf_windows_aware_platform_deps("subprocess"),
)
cc_library(
@@ -640,7 +602,7 @@
name = "test",
testonly = True,
textual_hdrs = ["test.h"],
- deps = tf_mobile_aware_deps("test_impl"),
+ deps = tf_platform_deps("test"),
)
cc_library(
@@ -649,8 +611,7 @@
hdrs = ["test_benchmark.h"],
deps = [
":platform",
- ":test_benchmark_impl",
- ],
+ ] + tf_platform_deps("test_benchmark"),
)
cc_library(
@@ -679,7 +640,7 @@
cc_library(
name = "tracing",
textual_hdrs = ["tracing.h"],
- deps = tf_mobile_aware_deps("tracing_impl"),
+ deps = tf_platform_deps("tracing"),
)
cc_library(
@@ -693,7 +654,7 @@
deps = [
":platform",
":tstring",
- ] + tf_mobile_aware_deps("types_impl"),
+ ] + tf_platform_deps("types"),
)
cc_library(
@@ -701,7 +662,7 @@
hdrs = ["unbounded_work_queue.h"],
deps = [
":platform",
- ] + tf_mobile_aware_deps("unbounded_work_queue_impl"),
+ ] + tf_platform_deps("unbounded_work_queue"),
)
# This is a hacky, do-nothing, binary that makes it easy to verify ability to
diff --git a/tensorflow/core/platform/build_config.bzl b/tensorflow/core/platform/build_config.bzl
index f0fa740..c96ef3d 100644
--- a/tensorflow/core/platform/build_config.bzl
+++ b/tensorflow/core/platform/build_config.bzl
@@ -20,7 +20,11 @@
_tf_fingerprint_deps = "tf_fingerprint_deps",
_tf_jspb_proto_library = "tf_jspb_proto_library",
_tf_kernel_tests_linkstatic = "tf_kernel_tests_linkstatic",
+ _tf_legacy_srcs_no_runtime_google = "tf_legacy_srcs_no_runtime_google",
_tf_lib_proto_parsing_deps = "tf_lib_proto_parsing_deps",
+ _tf_logging_deps = "tf_logging_deps",
+ _tf_monitoring_deps = "tf_monitoring_deps",
+ _tf_platform_deps = "tf_platform_deps",
_tf_proto_library = "tf_proto_library",
_tf_proto_library_cc = "tf_proto_library_cc",
_tf_proto_library_py = "tf_proto_library_py",
@@ -33,6 +37,7 @@
_tf_protos_profiler_impl = "tf_protos_profiler_impl",
_tf_py_clif_cc = "tf_py_clif_cc",
_tf_pyclif_proto_library = "tf_pyclif_proto_library",
+ _tf_windows_aware_platform_deps = "tf_windows_aware_platform_deps",
)
pyx_library = _pyx_library
@@ -53,7 +58,11 @@
tf_fingerprint_deps = _tf_fingerprint_deps
tf_jspb_proto_library = _tf_jspb_proto_library
tf_kernel_tests_linkstatic = _tf_kernel_tests_linkstatic
+tf_legacy_srcs_no_runtime_google = _tf_legacy_srcs_no_runtime_google
tf_lib_proto_parsing_deps = _tf_lib_proto_parsing_deps
+tf_logging_deps = _tf_logging_deps
+tf_monitoring_deps = _tf_monitoring_deps
+tf_platform_deps = _tf_platform_deps
tf_proto_library = _tf_proto_library
tf_proto_library_cc = _tf_proto_library_cc
tf_proto_library_py = _tf_proto_library_py
@@ -66,3 +75,4 @@
tf_protos_profiler_impl = _tf_protos_profiler_impl
tf_py_clif_cc = _tf_py_clif_cc
tf_pyclif_proto_library = _tf_pyclif_proto_library
+tf_windows_aware_platform_deps = _tf_windows_aware_platform_deps
diff --git a/tensorflow/core/platform/default/BUILD b/tensorflow/core/platform/default/BUILD
index d743776..04893ec 100644
--- a/tensorflow/core/platform/default/BUILD
+++ b/tensorflow/core/platform/default/BUILD
@@ -267,7 +267,6 @@
"no_oss",
"nobuilder",
],
- visibility = ["//visibility:private"],
deps = [
"@com_google_absl//absl/base",
"//tensorflow/core/platform:byte_order",
@@ -319,6 +318,21 @@
)
cc_library(
+ name = "stacktrace_handler",
+ srcs = ["stacktrace_handler.cc"],
+ hdrs = ["//tensorflow/core/platform:stacktrace_handler.h"],
+ tags = [
+ "manual",
+ "no_oss",
+ "nobuilder",
+ ],
+ deps = [
+ "//tensorflow/core/platform",
+ "//tensorflow/core/platform:stacktrace",
+ ],
+)
+
+cc_library(
name = "strong_hash",
tags = [
"manual",
diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl
index 0a318d7..025ca7a 100644
--- a/tensorflow/core/platform/default/build_config.bzl
+++ b/tensorflow/core/platform/default/build_config.bzl
@@ -745,3 +745,25 @@
],
otherwise = [clean_dep("@com_google_protobuf//:protobuf_headers")],
)
+
+def tf_windows_aware_platform_deps(name):
+ return select({
+ "//tensorflow:windows": [
+ "//tensorflow/core/platform/windows:" + name,
+ ],
+ "//conditions:default": [
+ "//tensorflow/core/platform/default:" + name,
+ ],
+ })
+
+def tf_platform_deps(name):
+ return ["//tensorflow/core/platform/default:" + name]
+
+def tf_logging_deps():
+ return ["//tensorflow/core/platform/default:logging"]
+
+def tf_monitoring_deps():
+ return ["//tensorflow/core/platform/default:monitoring"]
+
+def tf_legacy_srcs_no_runtime_google():
+ return []
diff --git a/tensorflow/core/platform/default/build_refactor.bzl b/tensorflow/core/platform/default/build_refactor.bzl
deleted file mode 100644
index 0fce21d..0000000
--- a/tensorflow/core/platform/default/build_refactor.bzl
+++ /dev/null
@@ -1,661 +0,0 @@
-"""
-Build targets for default implementations of tf/core/platform libraries.
-"""
-# This is a temporary hack to mimic the presence of a BUILD file under
-# tensorflow/core/platform/default. This is part of a large refactoring
-# of BUILD rules under tensorflow/core/platform. We will remove this file
-# and add real BUILD files under tensorflow/core/platform/default and
-# tensorflow/core/platform/windows after the refactoring is complete.
-
-load(
- "//tensorflow:tensorflow.bzl",
- "tf_copts",
-)
-
-TF_DEFAULT_PLATFORM_LIBRARIES = {
- "context": {
- "name": "context_impl",
- "hdrs": ["//tensorflow/core/platform:context.h"],
- "textual_hdrs": ["//tensorflow/core/platform/default:context.h"],
- "deps": [
- "//tensorflow/core/platform",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "cord": {
- "name": "cord_impl",
- "hdrs": ["//tensorflow/core/platform/default:cord.h"],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "cuda_libdevice_path": {
- "name": "cuda_libdevice_path_impl",
- "hdrs": [
- "//tensorflow/core/platform:cuda_libdevice_path.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:cuda_libdevice_path.cc",
- ],
- "deps": [
- "@local_config_cuda//cuda:cuda_headers",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:path",
- "//tensorflow/core/platform:types",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "dynamic_annotations": {
- "name": "dynamic_annotations_impl",
- "hdrs": [
- "//tensorflow/core/platform/default:dynamic_annotations.h",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "env": {
- "name": "env_impl",
- "hdrs": [
- "//tensorflow/core/platform:env.h",
- "//tensorflow/core/platform:file_system.h",
- "//tensorflow/core/platform:file_system_helper.h",
- "//tensorflow/core/platform:threadpool.h",
- ],
- "srcs": [
- "//tensorflow/core/platform:env.cc",
- "//tensorflow/core/platform:file_system.cc",
- "//tensorflow/core/platform:file_system_helper.cc",
- "//tensorflow/core/platform:threadpool.cc",
- "//tensorflow/core/platform/default:env.cc",
- "//tensorflow/core/platform/default:posix_file_system.h",
- "//tensorflow/core/platform/default:posix_file_system.cc",
- ],
- "deps": [
- "@com_google_absl//absl/time",
- "@com_google_absl//absl/types:optional",
- "//third_party/eigen3",
- "//tensorflow/core/lib/core:error_codes_proto_cc",
- "//tensorflow/core/lib/core:stringpiece",
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:blocking_counter",
- "//tensorflow/core/platform:context",
- "//tensorflow/core/platform:cord",
- "//tensorflow/core/platform:denormal",
- "//tensorflow/core/platform:error",
- "//tensorflow/core/platform:errors",
- "//tensorflow/core/platform:env_time",
- "//tensorflow/core/platform:file_statistics",
- "//tensorflow/core/platform:load_library",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:macros",
- "//tensorflow/core/platform:mutex",
- "//tensorflow/core/platform:path",
- "//tensorflow/core/platform:platform_port",
- "//tensorflow/core/platform:protobuf",
- "//tensorflow/core/platform:setround",
- "//tensorflow/core/platform:status",
- "//tensorflow/core/platform:stringpiece",
- "//tensorflow/core/platform:stringprintf",
- "//tensorflow/core/platform:strcat",
- "//tensorflow/core/platform:str_util",
- "//tensorflow/core/platform:threadpool_interface",
- "//tensorflow/core/platform:tracing",
- "//tensorflow/core/platform:types",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "env_time": {
- "name": "env_time_impl",
- "hdrs": [
- "//tensorflow/core/platform:env_time.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:env_time.cc",
- ],
- "deps": [
- "//tensorflow/core/platform:types",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "human_readable_json": {
- "name": "human_readable_json_impl",
- "hdrs": [
- "//tensorflow/core/platform:human_readable_json.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:human_readable_json.cc",
- ],
- "deps": [
- "//tensorflow/core/platform:errors",
- "//tensorflow/core/platform:protobuf",
- "//tensorflow/core/platform:status",
- "//tensorflow/core/platform:strcat",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "load_library": {
- "name": "load_library_impl",
- "hdrs": [
- "//tensorflow/core/platform:load_library.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:load_library.cc",
- ],
- "deps": [
- "//tensorflow/core/platform:errors",
- "//tensorflow/core/platform:status",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "logging": {
- "name": "logging_impl",
- "hdrs": [
- "//tensorflow/core/platform:logging.h",
- ],
- "textual_hdrs": [
- "//tensorflow/core/platform/default:logging.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:logging.cc",
- ],
- "deps": [
- "@com_google_absl//absl/base",
- "@com_google_absl//absl/strings",
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:env_time",
- "//tensorflow/core/platform:macros",
- "//tensorflow/core/platform:types",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "monitoring": {
- "name": "monitoring_impl",
- "hdrs": [
- "//tensorflow/core/platform:monitoring.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:monitoring.cc",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "mutex": {
- "name": "mutex_impl",
- "hdrs": [
- "//tensorflow/core/platform:mutex.h",
- ],
- "textual_hdrs": [
- "//tensorflow/core/platform/default:mutex.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:mutex.cc",
- "//tensorflow/core/platform/default:mutex_data.h",
- ],
- "deps": [
- "@nsync//:nsync_cpp",
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:macros",
- "//tensorflow/core/platform:thread_annotations",
- "//tensorflow/core/platform:types",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "net": {
- "name": "net_impl",
- "hdrs": [
- "//tensorflow/core/platform:net.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:net.cc",
- ],
- "deps": [
- "//tensorflow/core/platform:strcat",
- "//tensorflow/core/platform:logging",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- "alwayslink": 1,
- },
- "notification": {
- "name": "notification_impl",
- "hdrs": [
- "//tensorflow/core/platform/default:notification.h",
- ],
- "deps": [
- "//tensorflow/core/platform:mutex",
- "//tensorflow/core/platform:types",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "rocm_rocdl_path": {
- "name": "rocm_rocdl_path_impl",
- "hdrs": [
- "//tensorflow/core/platform:rocm_rocdl_path.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:rocm_rocdl_path.cc",
- ],
- "deps": [
- "@local_config_rocm//rocm:rocm_headers",
- "//tensorflow/core/platform:path",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:types",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "stacktrace": {
- "name": "stacktrace_impl",
- "hdrs": [
- "//tensorflow/core/platform/default:stacktrace.h",
- ],
- "deps": [
- "//tensorflow/core/platform:abi",
- "//tensorflow/core/platform:platform",
- ],
- "tags": ["no_oss", "manual"],
- "visibility": ["//visibility:private"],
- },
- "stacktrace_handler": {
- "name": "stacktrace_handler_impl",
- "hdrs": [
- "//tensorflow/core/platform:stacktrace_handler.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:stacktrace_handler.cc",
- ],
- "deps": [
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:stacktrace",
- ],
- "tags": ["no_oss", "manual"],
- "visibility": ["//visibility:private"],
- },
- "strong_hash": {
- "name": "strong_hash_impl",
- "textual_hdrs": [
- "//tensorflow/core/platform/default:strong_hash.h",
- ],
- "deps": [
- "@highwayhash//:sip_hash",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual"],
- },
- "subprocess": {
- "name": "subprocess_impl",
- "textual_hdrs": [
- "//tensorflow/core/platform/default:subprocess.h",
- ],
- "hdrs": [
- "//tensorflow/core/platform:subprocess.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:subprocess.cc",
- ],
- "deps": [
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:macros",
- "//tensorflow/core/platform:mutex",
- "//tensorflow/core/platform:types",
- ],
- "tags": ["no_oss", "manual"],
- "visibility": ["//visibility:private"],
- "alwayslink": 1,
- },
- "test": {
- "name": "test_impl",
- "testonly": True,
- "srcs": [
- "//tensorflow/core/platform/default:test.cc",
- ],
- "hdrs": [
- "//tensorflow/core/platform:test.h",
- ],
- "deps": [
- "@com_google_googletest//:gtest",
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:macros",
- "//tensorflow/core/platform:net",
- "//tensorflow/core/platform:strcat",
- "//tensorflow/core/platform:types",
- ],
- "tags": ["no_oss", "manual"],
- "visibility": ["//visibility:private"],
- },
- "test_benchmark": {
- "name": "test_benchmark_impl",
- "testonly": True,
- "srcs": [
- "//tensorflow/core/platform/default:test_benchmark.cc",
- ],
- "hdrs": [
- "//tensorflow/core/platform/default:test_benchmark.h",
- ],
- "deps": [
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:env",
- "//tensorflow/core/platform:macros",
- "//tensorflow/core/platform:types",
- "//tensorflow/core/util:reporter",
- ],
- "tags": ["no_oss", "manual"],
- "visibility": ["//visibility:private"],
- },
- "tracing": {
- "name": "tracing_impl",
- "textual_hdrs": [
- "//tensorflow/core/platform/default:tracing_impl.h",
- ],
- "hdrs": [
- "//tensorflow/core/platform:tracing.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:tracing.cc",
- "//tensorflow/core/platform:tracing.cc",
- ],
- "deps": [
- "//tensorflow/core/lib/hash",
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:hash",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:macros",
- "//tensorflow/core/platform:strcat",
- "//tensorflow/core/platform:str_util",
- "//tensorflow/core/platform:stringpiece",
- "//tensorflow/core/platform:types",
- ],
- "tags": ["no_oss", "manual"],
- "visibility": ["//visibility:private"],
- "alwayslink": 1,
- },
- "types": {
- "name": "types_impl",
- "textual_hdrs": [
- "//tensorflow/core/platform/default:integral_types.h",
- ],
- "tags": ["no_oss", "manual"],
- "visibility": ["//visibility:private"],
- },
- "unbounded_work_queue": {
- "name": "unbounded_work_queue_impl",
- "hdrs": [
- "//tensorflow/core/platform/default:unbounded_work_queue.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/default:unbounded_work_queue.cc",
- ],
- "deps": [
- "@com_google_absl//absl/memory",
- "//tensorflow/core/platform:env",
- "//tensorflow/core/platform:mutex",
- "//tensorflow/core/lib/core:notification",
- ],
- "tags": ["no_oss", "manual"],
- "visibility": ["//visibility:private"],
- },
-}
-
-TF_WINDOWS_PLATFORM_LIBRARIES = {
- "env": {
- "name": "windows_env_impl",
- "hdrs": [
- "//tensorflow/core/platform:env.h",
- "//tensorflow/core/platform:file_system.h",
- "//tensorflow/core/platform:file_system_helper.h",
- "//tensorflow/core/platform:threadpool.h",
- ],
- "srcs": [
- "//tensorflow/core/platform:env.cc",
- "//tensorflow/core/platform:file_system.cc",
- "//tensorflow/core/platform:file_system_helper.cc",
- "//tensorflow/core/platform:threadpool.cc",
- "//tensorflow/core/platform/windows:env.cc",
- "//tensorflow/core/platform/windows:windows_file_system.h",
- "//tensorflow/core/platform/windows:windows_file_system.cc",
- ],
- "deps": [
- "@com_google_absl//absl/time",
- "@com_google_absl//absl/types:optional",
- "//third_party/eigen3",
- "//tensorflow/core/lib/core:blocking_counter",
- "//tensorflow/core/lib/core:error_codes_proto_cc",
- "//tensorflow/core/lib/core:stringpiece",
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:context",
- "//tensorflow/core/platform:cord",
- "//tensorflow/core/platform:denormal",
- "//tensorflow/core/platform:error",
- "//tensorflow/core/platform:errors",
- "//tensorflow/core/platform:env_time",
- "//tensorflow/core/platform:file_statistics",
- "//tensorflow/core/platform:load_library",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:macros",
- "//tensorflow/core/platform:mutex",
- "//tensorflow/core/platform:path",
- "//tensorflow/core/platform:platform_port",
- "//tensorflow/core/platform:protobuf",
- "//tensorflow/core/platform:setround",
- "//tensorflow/core/platform:status",
- "//tensorflow/core/platform:stringpiece",
- "//tensorflow/core/platform:stringprintf",
- "//tensorflow/core/platform:strcat",
- "//tensorflow/core/platform:str_util",
- "//tensorflow/core/platform:threadpool_interface",
- "//tensorflow/core/platform:tracing",
- "//tensorflow/core/platform:types",
- "//tensorflow/core/platform:windows_wide_char_impl",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual", "nobuilder"],
- },
- "env_time": {
- "name": "windows_env_time_impl",
- "hdrs": [
- "//tensorflow/core/platform:env_time.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/windows:env_time.cc",
- ],
- "deps": [
- "//tensorflow/core/platform:types",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual", "nobuilder"],
- },
- "load_library": {
- "name": "windows_load_library_impl",
- "hdrs": [
- "//tensorflow/core/platform:load_library.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/windows:load_library.cc",
- ],
- "deps": [
- "//tensorflow/core/platform:errors",
- "//tensorflow/core/platform:status",
- "//tensorflow/core/platform:windows_wide_char_impl",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual", "nobuilder"],
- },
- "net": {
- "name": "windows_net_impl",
- "hdrs": [
- "//tensorflow/core/platform:net.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/windows:net.cc",
- ],
- "deps": [
- "//tensorflow/core/platform:error",
- "//tensorflow/core/platform:logging",
- ],
- "visibility": ["//visibility:private"],
- "tags": ["no_oss", "manual", "nobuilder"],
- },
- "stacktrace": {
- "name": "windows_stacktrace_impl",
- "hdrs": [
- "//tensorflow/core/platform/windows:stacktrace.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/windows:stacktrace.cc",
- ],
- "deps": [
- "//tensorflow/core/platform:mutex",
- ],
- "tags": ["no_oss", "manual", "nobuilder"],
- "visibility": ["//visibility:private"],
- },
- "stacktrace_handler": {
- "name": "windows_stacktrace_handler_impl",
- "hdrs": [
- "//tensorflow/core/platform:stacktrace_handler.h",
- ],
- "srcs": [
- "//tensorflow/core/platform/windows:stacktrace_handler.cc",
- ],
- "deps": [
- "//tensorflow/core/platform:mutex",
- "//tensorflow/core/platform:stacktrace",
- "//tensorflow/core/platform:types",
- ],
- "tags": ["no_oss", "manual", "nobuilder"],
- "visibility": ["//visibility:private"],
- },
- "subprocess": {
- "name": "windows_subprocess_impl",
- "textual_hdrs": [
- "//tensorflow/core/platform/windows:subprocess.h",
- ],
- "hdrs": [
- "//tensorflow/core/platform:subprocess.h",
- ],
- "deps": [
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:macros",
- "//tensorflow/core/platform:types",
- ],
- "tags": ["no_oss", "manual", "nobuilder"],
- "visibility": ["//visibility:private"],
- },
- "wide_char": {
- "name": "windows_wide_char_impl",
- "hdrs": [
- "//tensorflow/core/platform/windows:wide_char.h",
- ],
- "tags": ["no_oss", "manual", "nobuilder"],
- "visibility": ["//visibility:private"],
- },
-}
-
-def tf_instantiate_platform_libraries(names = []):
- for name in names:
- # Unfortunately, this target cannot be represented as a dictionary
- # because it uses "select"
- if name == "platform_port":
- native.cc_library(
- name = "platform_port_impl",
- srcs = [
- "//tensorflow/core/platform:cpu_info.cc",
- "//tensorflow/core/platform/default:port.cc",
- ],
- hdrs = [
- "//tensorflow/core/platform:cpu_info.h",
- "//tensorflow/core/platform:demangle.h",
- "//tensorflow/core/platform:host_info.h",
- "//tensorflow/core/platform:init_main.h",
- "//tensorflow/core/platform:mem.h",
- "//tensorflow/core/platform:numa.h",
- "//tensorflow/core/platform:snappy.h",
- ],
- defines = ["TF_USE_SNAPPY"] + select({
- # TF Additional NUMA defines
- "//tensorflow:with_numa_support": ["TENSORFLOW_USE_NUMA"],
- "//conditions:default": [],
- }),
- copts = tf_copts(),
- deps = [
- "@com_google_absl//absl/base",
- "//tensorflow/core/platform:byte_order",
- "//tensorflow/core/platform:dynamic_annotations",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:types",
- "//tensorflow/core/platform",
- "@snappy",
- ] + select({
- # TF Additional NUMA dependencies
- "//tensorflow:android": [],
- "//tensorflow:ios": [],
- "//tensorflow:macos": [],
- "//conditions:default": [
- "@hwloc",
- ],
- }),
- visibility = ["//visibility:private"],
- tags = ["no_oss", "manual"],
- )
- native.cc_library(
- name = "windows_platform_port_impl",
- srcs = [
- "//tensorflow/core/platform:cpu_info.cc",
- "//tensorflow/core/platform/windows:port.cc",
- ],
- hdrs = [
- "//tensorflow/core/platform:cpu_info.h",
- "//tensorflow/core/platform:demangle.h",
- "//tensorflow/core/platform:host_info.h",
- "//tensorflow/core/platform:init_main.h",
- "//tensorflow/core/platform:mem.h",
- "//tensorflow/core/platform:numa.h",
- "//tensorflow/core/platform:snappy.h",
- ],
- defines = ["TF_USE_SNAPPY"],
- copts = tf_copts(),
- deps = [
- "//tensorflow/core/platform",
- "//tensorflow/core/platform:byte_order",
- "//tensorflow/core/platform:dynamic_annotations",
- "//tensorflow/core/platform:logging",
- "//tensorflow/core/platform:types",
- "@snappy",
- ],
- visibility = ["//visibility:private"],
- tags = ["no_oss", "manual"],
- )
- else:
- if name in TF_DEFAULT_PLATFORM_LIBRARIES:
- native.cc_library(**TF_DEFAULT_PLATFORM_LIBRARIES[name])
- if name in TF_WINDOWS_PLATFORM_LIBRARIES:
- native.cc_library(**TF_WINDOWS_PLATFORM_LIBRARIES[name])
-
-def tf_mobile_aware_deps(name):
- return [":" + name]
-
-def tf_platform_helper_deps(name):
- return select({
- "//tensorflow:windows": [":windows_" + name],
- "//conditions:default": [":" + name],
- })
-
-def tf_logging_deps():
- return [":logging_impl"]
-
-def tf_monitoring_deps():
- return [":monitoring_impl"]
-
-def tf_legacy_srcs_no_runtime_google():
- return []
diff --git a/tensorflow/core/platform/windows/BUILD b/tensorflow/core/platform/windows/BUILD
index aa6e84d..397217c 100644
--- a/tensorflow/core/platform/windows/BUILD
+++ b/tensorflow/core/platform/windows/BUILD
@@ -81,6 +81,17 @@
)
cc_library(
+ name = "intrinsics_port",
+ srcs = ["intrinsics_port.h"],
+ tags = [
+ "manual",
+ "no_oss",
+ "nobuilder",
+ ],
+ deps = ["//tensorflow/core/platform:types"],
+)
+
+cc_library(
name = "load_library",
srcs = ["load_library.cc"],
hdrs = ["//tensorflow/core/platform:load_library.h"],
@@ -199,6 +210,6 @@
)
exports_files(
- srcs = glob(["*"]),
+ srcs = ["intrinsics_port.h"],
visibility = ["//tensorflow/core/platform:__pkg__"],
)