diff --git a/tensorflow/BUILD b/tensorflow/BUILD index 2b151a76f148ec..c2a5de963b1fb8 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -44,12 +44,6 @@ config_setting( visibility = ["//visibility:public"], ) -config_setting( - name = "windows", - values = {"cpu": "x64_windows_msvc"}, - visibility = ["//visibility:public"], -) - config_setting( name = "ios", values = { diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 24449e0f9d9192..2c936bd5747f90 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -64,7 +64,6 @@ load( "//tensorflow:tensorflow.bzl", "if_android", "if_ios", - "if_not_windows", "tf_copts", "tf_cc_test", "tf_cc_tests", @@ -141,7 +140,6 @@ cc_library( "platform/protobuf.h", "platform/types.h", ] + glob(tf_additional_proto_hdrs()), - copts = tf_copts(), deps = [ ":protos_all_cc", "//tensorflow/core/platform/default/build_config:proto_parsing", @@ -295,6 +293,8 @@ tf_cuda_library( "util/example_proto_fast_parsing.h", "util/example_proto_helper.h", "util/guarded_philox_random.h", + "util/memmapped_file_system.h", + "util/memmapped_file_system_writer.h", "util/mirror_pad_mode.h", "util/padding.h", "util/port.h", @@ -311,13 +311,7 @@ tf_cuda_library( "util/use_cudnn.h", "util/util.h", "util/work_sharder.h", - ] + select({ - "//tensorflow:windows": [], - "//conditions:default": [ - "util/memmapped_file_system.h", - "util/memmapped_file_system_writer.h", - ], - }), + ], visibility = ["//visibility:public"], deps = [":framework_internal"], ) @@ -518,6 +512,7 @@ cc_library( "//tensorflow/core/kernels:control_flow_ops", "//tensorflow/core/kernels:ctc_ops", "//tensorflow/core/kernels:data_flow", + "//tensorflow/core/kernels:fact_op", "//tensorflow/core/kernels:function_ops", "//tensorflow/core/kernels:image", "//tensorflow/core/kernels:io", @@ -536,11 +531,7 @@ cc_library( "//tensorflow/core/kernels:string", "//tensorflow/core/kernels:training_ops", "//tensorflow/models/embedding:word2vec_kernels", - ] + if_not_windows([ - "//tensorflow/core/kernels:fact_op", - "//tensorflow/core/kernels:array_not_windows", - "//tensorflow/core/kernels:math_not_windows", - ]), + ], ) tf_cuda_library( @@ -880,12 +871,12 @@ cc_library( # Libraries with GPU facilities that are useful for writing kernels. cc_library( name = "gpu_lib", - srcs = if_not_windows([ + srcs = [ "common_runtime/gpu/gpu_event_mgr.cc", - ]), - hdrs = if_not_windows([ + ], + hdrs = [ "common_runtime/gpu/gpu_event_mgr.h", - ]), + ], copts = tf_copts(), visibility = ["//visibility:public"], deps = [ @@ -895,7 +886,8 @@ cc_library( ":lib_internal", ":proto_text", ":protos_all_cc", - ] + if_not_windows([":stream_executor"]), + ":stream_executor", + ], ) cc_library( @@ -955,47 +947,26 @@ tf_proto_library_cc( cc_library( name = "lib_internal", - srcs = select({ - "//tensorflow:windows": glob( - [ - "lib/**/*.h", - "lib/**/*.cc", - "platform/*.h", - "platform/*.cc", - ], - exclude = [ - "**/*test*", - "platform/**/cuda.h", - "platform/**/stream_executor.h", - "platform/load_library.cc", - ], - ), - "//conditions:default": glob( + srcs = glob( + [ + "lib/**/*.h", + "lib/**/*.cc", + "platform/*.h", + "platform/*.cc", + "platform/profile_utils/**/*.h", + "platform/profile_utils/**/*.cc", + ] + tf_additional_lib_srcs(), + exclude = [ - "lib/**/*.h", - "lib/**/*.cc", - "platform/*.h", - "platform/*.cc", - "platform/profile_utils/**/*.h", - "platform/profile_utils/**/*.cc", - ], - exclude = [ "**/*test*", "platform/**/cuda.h", "platform/**/stream_executor.h", - ], - ), - }) + tf_additional_lib_srcs( - exclude = [ - "**/*test*", - "platform/**/cuda.h", - "platform/**/stream_executor.h", - ] + - # Protobuf deps already included through the ":lib_proto_parsing" - # dependency. - tf_additional_proto_srcs(), + ] + + # Protobuf deps already included through the ":lib_proto_parsing" + # dependency. + tf_additional_proto_srcs(), ), - hdrs = tf_additional_lib_hdrs() + [ + hdrs = glob(tf_additional_lib_hdrs()) + [ "lib/core/blocking_counter.h", "lib/core/refcount.h", "lib/gif/gif_io.h", @@ -1066,7 +1037,6 @@ tf_version_info_genrule() cc_library( name = "version_lib", srcs = ["util/version_info.cc"], - copts = tf_copts(), ) tf_cuda_library( @@ -1088,18 +1058,8 @@ tf_cuda_library( "util/reporter.h", "util/reporter.cc", "framework/fake_input.*", - "util/memmapped_file_system.*", - "util/memmapped_file_system_writer.*", ], - ) + select({ - "//tensorflow:windows": [], - "//conditions:default": glob([ - "util/memmapped_file_system.h", - "util/memmapped_file_system.cc", - "util/memmapped_file_system_writer.h", - "util/memmapped_file_system_writer.cc", - ]), - }), + ), hdrs = [ "framework/op_segment.h", "framework/rendezvous.h", # only needed for tests @@ -1373,7 +1333,7 @@ tf_cuda_library( tf_cuda_library( name = "gpu_runtime", - srcs = if_not_windows([ + srcs = [ "common_runtime/gpu/gpu_bfc_allocator.cc", "common_runtime/gpu/gpu_debug_allocator.cc", "common_runtime/gpu/gpu_device.cc", @@ -1385,8 +1345,8 @@ tf_cuda_library( "common_runtime/gpu/pool_allocator.cc", "common_runtime/gpu/process_state.cc", "common_runtime/gpu_device_context.h", - ]), - hdrs = if_not_windows([ + ], + hdrs = [ "common_runtime/gpu/gpu_bfc_allocator.h", "common_runtime/gpu/gpu_debug_allocator.h", "common_runtime/gpu/gpu_device.h", @@ -1395,7 +1355,7 @@ tf_cuda_library( "common_runtime/gpu/gpu_util.h", "common_runtime/gpu/pool_allocator.h", "common_runtime/gpu/process_state.h", - ]), + ], copts = tf_copts(), linkstatic = 1, deps = [ @@ -1407,10 +1367,9 @@ tf_cuda_library( ":lib", ":lib_internal", ":protos_all_cc", - "//third_party/eigen3", - ] + if_not_windows([ ":stream_executor", - ]), + "//third_party/eigen3", + ], alwayslink = 1, ) diff --git a/tensorflow/core/kernels/BUILD b/tensorflow/core/kernels/BUILD index e5295e41eba333..36b4def0ef6076 100644 --- a/tensorflow/core/kernels/BUILD +++ b/tensorflow/core/kernels/BUILD @@ -25,7 +25,6 @@ package_group( load( "//tensorflow:tensorflow.bzl", - "if_not_windows", "tf_cc_test", "tf_cc_tests", "tf_copts", @@ -385,41 +384,6 @@ cc_header_only_library( # OpKernel libraries ---------------------------------------------------------- -ARRAY_DEPS = [ - ":batch_space_ops", - ":bounds_check", - ":concat_lib", - ":cuda_device_array", - ":depth_space_ops", - ":extract_image_patches_op", - ":fill_functor", - ":gather_functor", - ":ops_util", - ":split_lib", - ":strided_slice_op", - ":transpose_functor", - "//tensorflow/core:array_grad", - "//tensorflow/core:array_ops_op_lib", - "//tensorflow/core:core_cpu", - "//tensorflow/core:framework", - "//tensorflow/core:gpu_runtime", - "//tensorflow/core:lib", - "//tensorflow/core:lib_internal", - "//tensorflow/core:proto_text", - "//tensorflow/core:protos_all_cc", - "//tensorflow/core/debug:debug_io_utils", - "//third_party/eigen3", -] - -tf_kernel_libraries( - name = "array_not_windows", - prefixes = [ - "debug_ops", - "immutable_constant_op", - ], - deps = ARRAY_DEPS, -) - tf_kernel_libraries( name = "array", prefixes = [ @@ -427,6 +391,7 @@ tf_kernel_libraries( "bitcast_op", "concat_op", "constant_op", + "debug_ops", "diag_op", "matrix_band_part_op", "matrix_diag_op", @@ -435,6 +400,7 @@ tf_kernel_libraries( "gather_op", "gather_nd_op", "identity_op", + "immutable_constant_op", "listdiff_op", "mirror_pad_op", "one_hot_op", @@ -453,7 +419,31 @@ tf_kernel_libraries( "unpack_op", "where_op", ], - deps = ARRAY_DEPS, + deps = [ + ":batch_space_ops", + ":bounds_check", + ":concat_lib", + ":cuda_device_array", + ":depth_space_ops", + ":extract_image_patches_op", + ":fill_functor", + ":gather_functor", + ":ops_util", + ":split_lib", + ":strided_slice_op", + ":transpose_functor", + "//tensorflow/core:array_grad", + "//tensorflow/core:array_ops_op_lib", + "//tensorflow/core:core_cpu", + "//tensorflow/core:framework", + "//tensorflow/core:gpu_runtime", + "//tensorflow/core:lib", + "//tensorflow/core:lib_internal", + "//tensorflow/core:proto_text", + "//tensorflow/core:protos_all_cc", + "//tensorflow/core/debug:debug_io_utils", + "//third_party/eigen3", + ], ) tf_cc_test( @@ -1272,27 +1262,6 @@ tf_cc_tests( ], ) -MATH_DEPS = [ - ":bounds_check", - ":fill_functor", - ":transpose_functor", - "//tensorflow/core:core_cpu", - "//tensorflow/core:framework", - "//tensorflow/core:lib", - "//tensorflow/core:lib_internal", - "//tensorflow/core:math_grad", - "//tensorflow/core:math_ops_op_lib", - "//third_party/eigen3", -] - -tf_kernel_libraries( - name = "math_not_windows", - prefixes = [ - "sparse_matmul_op", - ], - deps = MATH_DEPS, -) - tf_kernel_libraries( name = "math", prefixes = [ @@ -1310,8 +1279,20 @@ tf_kernel_libraries( "segment_reduction_ops", "scan_ops", "sequence_ops", + "sparse_matmul_op", + ], + deps = [ + ":bounds_check", + ":fill_functor", + ":transpose_functor", + "//tensorflow/core:core_cpu", + "//tensorflow/core:framework", + "//tensorflow/core:lib", + "//tensorflow/core:lib_internal", + "//tensorflow/core:math_grad", + "//tensorflow/core:math_ops_op_lib", + "//third_party/eigen3", ], - deps = MATH_DEPS, ) tf_cuda_cc_test( @@ -1591,6 +1572,7 @@ tf_kernel_libraries( ":conv_2d", ":conv_ops", ":depthwise_conv_grad_op", + ":depthwise_conv_op", ":dilation_ops", ":fused_batch_norm_util_gpu", ":ops_util", @@ -1601,9 +1583,7 @@ tf_kernel_libraries( "//tensorflow/core:nn_grad", "//tensorflow/core:nn_ops_op_lib", "//third_party/eigen3", - ] + if_not_windows([ - ":depthwise_conv_op", - ]), + ], ) tf_cuda_cc_test( diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl index 17e68a134cc89e..23404cd4240f55 100644 --- a/tensorflow/core/platform/default/build_config.bzl +++ b/tensorflow/core/platform/default/build_config.bzl @@ -90,31 +90,17 @@ def tf_proto_library(name, srcs = [], has_services = None, visibility = visibility, ) -def tf_additional_lib_hdrs(exclude = []): - return select({ - "//tensorflow:windows" : native.glob([ - "platform/default/*.h", - "platform/windows/*.h", - "platform/posix/error.h", - ], exclude = exclude), - "//conditions:default" : native.glob([ - "platform/default/*.h", - "platform/posix/*.h", - ], exclude = exclude), - }) - -def tf_additional_lib_srcs(exclude = []): - return select({ - "//tensorflow:windows" : native.glob([ - "platform/default/*.cc", - "platform/windows/*.cc", - "platform/posix/error.cc", - ], exclude = exclude), - "//conditions:default" : native.glob([ - "platform/default/*.cc", - "platform/posix/*.cc", - ], exclude = exclude), - }) +def tf_additional_lib_hdrs(): + return [ + "platform/default/*.h", + "platform/posix/*.h", + ] + +def tf_additional_lib_srcs(): + return [ + "platform/default/*.cc", + "platform/posix/*.cc", + ] def tf_additional_minimal_lib_srcs(): return [ diff --git a/tensorflow/core/platform/windows/env.cc b/tensorflow/core/platform/windows/env.cc index 09edc10a94bc38..a2182a831cb99b 100644 --- a/tensorflow/core/platform/windows/env.cc +++ b/tensorflow/core/platform/windows/env.cc @@ -32,8 +32,6 @@ limitations under the License. #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/windows/windows_file_system.h" -#pragma comment(lib, "Shlwapi.lib") - namespace tensorflow { namespace { diff --git a/tensorflow/core/platform/windows/port.cc b/tensorflow/core/platform/windows/port.cc index 0721976f3e0b0d..b08c1cf9f4ebd9 100644 --- a/tensorflow/core/platform/windows/port.cc +++ b/tensorflow/core/platform/windows/port.cc @@ -20,7 +20,6 @@ limitations under the License. #include #endif #include -#pragma comment(lib, "Ws2_32.lib") #include "tensorflow/core/platform/cpu_info.h" #include "tensorflow/core/platform/demangle.h" diff --git a/tensorflow/core/util/tensor_bundle/BUILD b/tensorflow/core/util/tensor_bundle/BUILD index d6db84277f76dc..6b2c37fe392f62 100644 --- a/tensorflow/core/util/tensor_bundle/BUILD +++ b/tensorflow/core/util/tensor_bundle/BUILD @@ -9,8 +9,6 @@ licenses(["notice"]) # Apache 2.0 exports_files(["LICENSE"]) -load("//tensorflow:tensorflow.bzl", "tf_copts") - # To be exported to tensorflow/core:android_srcs. filegroup( name = "android_srcs", @@ -26,7 +24,6 @@ cc_library( name = "tensor_bundle", srcs = ["tensor_bundle.cc"], hdrs = ["tensor_bundle.h"], - copts = tf_copts(), deps = [ ":naming", "//tensorflow/core:core_cpu_internal", diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index 6d60d50acdf49a..1abac91e1a44e5 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -140,12 +140,6 @@ def if_not_mobile(a): "//conditions:default": a, }) -def if_not_windows(a): - return select({ - "//tensorflow:windows": [], - "//conditions:default": a, - }) - def tf_copts(): return (["-fno-exceptions", "-DEIGEN_AVOID_STL_ARRAY"] + if_cuda(["-DGOOGLE_CUDA=1"]) + @@ -157,10 +151,6 @@ def tf_copts(): "-O2", ], "//tensorflow:darwin": [], - "//tensorflow:windows": [ - "/DLANG_CXX11", - "/D__VERSION__=\\\"MSVC\\\"", - ], "//tensorflow:ios": ["-std=c++11",], "//conditions:default": ["-pthread"]})) diff --git a/tensorflow/tools/proto_text/BUILD b/tensorflow/tools/proto_text/BUILD index d439c9abfdc491..af80d3a4412002 100644 --- a/tensorflow/tools/proto_text/BUILD +++ b/tensorflow/tools/proto_text/BUILD @@ -42,17 +42,12 @@ cc_library( name = "gen_proto_text_functions_lib", srcs = ["gen_proto_text_functions_lib.cc"], hdrs = ["gen_proto_text_functions_lib.h"], - linkopts = select({ - "//tensorflow:windows": [], - "//tensorflow:darwin": [ - "-lm", - "-lpthread", - ], - "//conditions:default": [ - "-lm", - "-lpthread", - "-lrt", - ], + linkopts = [ + "-lm", + "-lpthread", + ] + select({ + "//tensorflow:darwin": [], + "//conditions:default": ["-lrt"], }), deps = [ "//tensorflow/core:lib_proto_parsing", diff --git a/third_party/gpus/cuda/platform.bzl.tpl b/third_party/gpus/cuda/platform.bzl.tpl index 539ed58d2c7f32..7565dfc12942bc 100644 --- a/third_party/gpus/cuda/platform.bzl.tpl +++ b/third_party/gpus/cuda/platform.bzl.tpl @@ -14,11 +14,6 @@ def cuda_library_path(name, version = cuda_sdk_version()): return "lib/lib{}.dylib".format(name) else: return "lib/lib{}.{}.dylib".format(name, version) - elif PLATFORM == "Windows": - if not version: - return "lib/{}.dll".format(name) - else: - return "lib/{}{}.dll".format(name, version) else: if not version: return "lib64/lib{}.so".format(name) @@ -28,8 +23,6 @@ def cuda_library_path(name, version = cuda_sdk_version()): def cuda_static_library_path(name): if PLATFORM == "Darwin": return "lib/lib{}_static.a".format(name) - elif PLATFORM == "Windows": - return "lib/{}_static.lib".format(name) else: return "lib64/lib{}_static.a".format(name) @@ -39,11 +32,6 @@ def cudnn_library_path(version = cudnn_sdk_version()): return "lib/libcudnn.dylib" else: return "lib/libcudnn.{}.dylib".format(version) - elif PLATFORM == "Windows": - if not version: - return "lib/cudnn.dll" - else: - return "lib/cudnn{}.dll".format(version) else: if not version: return "lib64/libcudnn.so" @@ -56,11 +44,6 @@ def cupti_library_path(version = cuda_sdk_version()): return "extras/CUPTI/lib/libcupti.dylib" else: return "extras/CUPTI/lib/libcupti.{}.dylib".format(version) - elif PLATFORM == "Windows": - if not version: - return "extras/CUPTI/lib/cupti.dll" - else: - return "extras/CUPTI/lib/cupti{}.dll".format(version) else: if not version: return "extras/CUPTI/lib64/libcupti.so"