parent
55fc2386f7
commit
4a8171ecd7
@ -108,14 +108,10 @@ load(
|
||||
"tf_additional_all_protos",
|
||||
"tf_additional_core_deps",
|
||||
"tf_additional_human_readable_json_deps",
|
||||
"tf_additional_lib_defines",
|
||||
"tf_additional_lib_deps",
|
||||
"tf_additional_libdevice_data",
|
||||
"tf_additional_libdevice_deps",
|
||||
"tf_additional_monitoring_hdrs",
|
||||
"tf_additional_numa_copts",
|
||||
"tf_additional_numa_deps",
|
||||
"tf_additional_numa_lib_defines",
|
||||
"tf_additional_test_deps",
|
||||
"tf_grpc_service_all",
|
||||
"tf_jspb_proto_library",
|
||||
@ -534,7 +530,7 @@ cc_library(
|
||||
"@com_google_absl//absl/strings",
|
||||
"@double_conversion//:double-conversion",
|
||||
"//tensorflow/core/lib/bfloat16",
|
||||
"//tensorflow/core/platform:cpu_info",
|
||||
"//tensorflow/core/platform:platform_port",
|
||||
"//tensorflow/core/platform:logging",
|
||||
"//tensorflow/core/platform:macros",
|
||||
"//tensorflow/core/platform:platform",
|
||||
@ -943,6 +939,7 @@ cc_library(
|
||||
"//third_party/eigen3",
|
||||
"//tensorflow/core/lib/bfloat16",
|
||||
"//tensorflow/core/platform:dynamic_annotations",
|
||||
"//tensorflow/core/platform:platform_port",
|
||||
"//tensorflow/core/platform:thread_annotations",
|
||||
"//tensorflow/core/platform:mutex",
|
||||
"//tensorflow/core/platform/default/build_config:minimal",
|
||||
@ -2245,19 +2242,11 @@ LIB_INTERNAL_PUBLIC_HEADERS = [
|
||||
"util/env_var.h",
|
||||
]
|
||||
|
||||
# Replicated for lib_internal and lib_internal_impl.
|
||||
LIB_INTERNAL_DEFINES = (
|
||||
tf_additional_lib_defines() + [
|
||||
"TF_USE_SNAPPY",
|
||||
] + tf_additional_numa_lib_defines()
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "lib_internal",
|
||||
srcs = LIB_INTERNAL_PRIVATE_HEADERS,
|
||||
hdrs = LIB_INTERNAL_PUBLIC_HEADERS,
|
||||
copts = tf_copts(),
|
||||
defines = LIB_INTERNAL_DEFINES,
|
||||
linkopts = select({
|
||||
"//tensorflow:freebsd": [],
|
||||
"//tensorflow:windows": [],
|
||||
@ -2303,39 +2292,37 @@ cc_library(
|
||||
],
|
||||
hdrs = LIB_INTERNAL_PUBLIC_HEADERS,
|
||||
copts = tf_copts(),
|
||||
defines = LIB_INTERNAL_DEFINES,
|
||||
deps = tf_additional_lib_deps() + [
|
||||
":core_stringpiece",
|
||||
":lib_hash_crc32c_accelerate_internal",
|
||||
":lib_proto_parsing",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/strings",
|
||||
"//third_party/eigen3",
|
||||
"//tensorflow/core/lib/bfloat16",
|
||||
"//tensorflow/core/lib/math:math_util",
|
||||
"//tensorflow/core/platform:abi",
|
||||
"//tensorflow/core/platform:annotation",
|
||||
"//tensorflow/core/platform:cpu_info",
|
||||
"//tensorflow/core/platform:denormal",
|
||||
"//tensorflow/core/platform:dynamic_annotations",
|
||||
"//tensorflow/core/platform:mutex",
|
||||
"//tensorflow/core/platform:notification",
|
||||
"//tensorflow/core/platform:numbers",
|
||||
"//tensorflow/core/platform:platform_strings",
|
||||
"//tensorflow/core/platform:scanner",
|
||||
"//tensorflow/core/platform:setround",
|
||||
"//tensorflow/core/platform:strong_hash",
|
||||
"//tensorflow/core/platform:strcat",
|
||||
"//tensorflow/core/platform:stringprintf",
|
||||
"//tensorflow/core/platform:str_util",
|
||||
"//tensorflow/core/platform:thread_annotations",
|
||||
"//tensorflow/core/platform/default/build_config:platformlib",
|
||||
"@snappy",
|
||||
"@zlib_archive//:zlib",
|
||||
"@double_conversion//:double-conversion",
|
||||
"@com_google_protobuf//:protobuf",
|
||||
] + tf_protos_all_impl() + tf_protos_grappler_impl() +
|
||||
tf_additional_numa_deps(),
|
||||
":core_stringpiece",
|
||||
":lib_hash_crc32c_accelerate_internal",
|
||||
":lib_proto_parsing",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@com_google_absl//absl/strings",
|
||||
"//third_party/eigen3",
|
||||
"//tensorflow/core/lib/bfloat16",
|
||||
"//tensorflow/core/lib/math:math_util",
|
||||
"//tensorflow/core/platform:abi",
|
||||
"//tensorflow/core/platform:annotation",
|
||||
"//tensorflow/core/platform:denormal",
|
||||
"//tensorflow/core/platform:dynamic_annotations",
|
||||
"//tensorflow/core/platform:mutex",
|
||||
"//tensorflow/core/platform:notification",
|
||||
"//tensorflow/core/platform:numbers",
|
||||
"//tensorflow/core/platform:platform_port",
|
||||
"//tensorflow/core/platform:platform_strings",
|
||||
"//tensorflow/core/platform:scanner",
|
||||
"//tensorflow/core/platform:setround",
|
||||
"//tensorflow/core/platform:strong_hash",
|
||||
"//tensorflow/core/platform:strcat",
|
||||
"//tensorflow/core/platform:stringprintf",
|
||||
"//tensorflow/core/platform:str_util",
|
||||
"//tensorflow/core/platform:thread_annotations",
|
||||
"//tensorflow/core/platform/default/build_config:platformlib",
|
||||
"@snappy",
|
||||
"@zlib_archive//:zlib",
|
||||
"@double_conversion//:double-conversion",
|
||||
"@com_google_protobuf//:protobuf",
|
||||
] + tf_protos_all_impl() + tf_protos_grappler_impl(),
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
|
@ -128,21 +128,8 @@ cc_library(
|
||||
hdrs = ["cpu_feature_guard.h"],
|
||||
deps = [
|
||||
":byte_order",
|
||||
":cpu_info",
|
||||
":logging",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "cpu_info",
|
||||
srcs = ["cpu_info.cc"],
|
||||
hdrs = ["cpu_info.h"],
|
||||
copts = tf_copts(),
|
||||
deps = [
|
||||
":byte_order",
|
||||
":logging",
|
||||
":platform",
|
||||
":types",
|
||||
":platform_port",
|
||||
],
|
||||
)
|
||||
|
||||
@ -169,10 +156,10 @@ cc_library(
|
||||
hdrs = ["denormal.h"],
|
||||
deps = [
|
||||
":byte_order",
|
||||
":cpu_info",
|
||||
":logging",
|
||||
":macros",
|
||||
":platform",
|
||||
":platform_port",
|
||||
],
|
||||
)
|
||||
|
||||
@ -334,10 +321,6 @@ cc_library(
|
||||
|
||||
cc_library(
|
||||
name = "platform_port",
|
||||
srcs = [
|
||||
"cpu_info.cc",
|
||||
],
|
||||
copts = tf_copts(),
|
||||
textual_hdrs = [
|
||||
"cpu_info.h",
|
||||
"demangle.h",
|
||||
@ -347,11 +330,7 @@ cc_library(
|
||||
"numa.h",
|
||||
"snappy.h",
|
||||
],
|
||||
deps = [
|
||||
":logging",
|
||||
":platform",
|
||||
":types",
|
||||
] + tf_platform_helper_deps("platform_port_impl"),
|
||||
deps = tf_platform_helper_deps("platform_port_impl"),
|
||||
)
|
||||
|
||||
build_test(
|
||||
@ -644,6 +623,7 @@ filegroup(
|
||||
"**/logger.cc",
|
||||
"**/mutex.cc",
|
||||
"**/logging.cc",
|
||||
"**/port.cc",
|
||||
"**/human_readable_json.cc",
|
||||
"**/rocm.h",
|
||||
"**/rocm_rocdl_path.cc",
|
||||
@ -747,6 +727,7 @@ filegroup(
|
||||
"**/logger.cc",
|
||||
"**/mutex.cc",
|
||||
"**/logging.cc",
|
||||
"**/port.cc",
|
||||
"**/human_readable_json.cc",
|
||||
"**/rocm_rocdl_path.cc",
|
||||
"abi.cc",
|
||||
|
@ -609,10 +609,6 @@ def tf_additional_test_srcs():
|
||||
def tf_kernel_tests_linkstatic():
|
||||
return 0
|
||||
|
||||
def tf_additional_lib_defines():
|
||||
"""Additional defines needed to build TF libraries."""
|
||||
return []
|
||||
|
||||
def tf_additional_lib_deps():
|
||||
"""Additional dependencies needed to build TF libraries."""
|
||||
return [
|
||||
@ -667,12 +663,6 @@ def tf_lib_proto_compiler_deps():
|
||||
"@com_google_protobuf//:protoc_lib",
|
||||
]
|
||||
|
||||
def tf_additional_numa_lib_defines():
|
||||
return select({
|
||||
"//tensorflow:with_numa_support": ["TENSORFLOW_USE_NUMA"],
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
def tf_py_clif_cc(name, visibility = None, **kwargs):
|
||||
pass
|
||||
|
||||
@ -706,29 +696,6 @@ def tf_additional_binary_deps():
|
||||
],
|
||||
)
|
||||
|
||||
def tf_additional_numa_deps():
|
||||
return select({
|
||||
"//tensorflow:android": [],
|
||||
"//tensorflow:ios": [],
|
||||
"//tensorflow:windows": [],
|
||||
"//tensorflow:macos": [],
|
||||
"//conditions:default": [
|
||||
"@hwloc",
|
||||
],
|
||||
})
|
||||
|
||||
def tf_additional_numa_copts():
|
||||
return select({
|
||||
"//tensorflow:android": [],
|
||||
"//tensorflow:ios": [],
|
||||
"//tensorflow:windows": [],
|
||||
"//tensorflow:macos": [],
|
||||
"//conditions:default": [
|
||||
"-Ithird_party/hwloc/hwloc-master/include",
|
||||
"-DTENSORFLOW_USE_NUMA",
|
||||
],
|
||||
})
|
||||
|
||||
def tf_additional_rpc_deps():
|
||||
return []
|
||||
|
||||
|
@ -7,11 +7,6 @@ Build targets for default implementations of tf/core/platform libraries.
|
||||
# and add real BUILD files under tensorflow/core/platform/default and
|
||||
# tensorflow/core/platform/windows after the refactoring is complete.
|
||||
|
||||
load(
|
||||
"//tensorflow/core/platform:default/build_config.bzl",
|
||||
"tf_additional_numa_copts",
|
||||
"tf_additional_numa_deps",
|
||||
)
|
||||
load(
|
||||
"//tensorflow:tensorflow.bzl",
|
||||
"tf_copts",
|
||||
@ -539,6 +534,7 @@ def tf_instantiate_platform_libraries(names = []):
|
||||
native.cc_library(
|
||||
name = "platform_port_impl",
|
||||
srcs = [
|
||||
"//tensorflow/core/platform:cpu_info.cc",
|
||||
"//tensorflow/core/platform:default/port.cc",
|
||||
],
|
||||
hdrs = [
|
||||
@ -550,7 +546,12 @@ def tf_instantiate_platform_libraries(names = []):
|
||||
"//tensorflow/core/platform:numa.h",
|
||||
"//tensorflow/core/platform:snappy.h",
|
||||
],
|
||||
copts = tf_copts() + tf_additional_numa_copts(),
|
||||
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",
|
||||
@ -559,13 +560,22 @@ def tf_instantiate_platform_libraries(names = []):
|
||||
"//tensorflow/core/platform:types",
|
||||
"//tensorflow/core/platform",
|
||||
"@snappy",
|
||||
] + tf_additional_numa_deps(),
|
||||
] + 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 = [
|
||||
@ -577,6 +587,7 @@ def tf_instantiate_platform_libraries(names = []):
|
||||
"//tensorflow/core/platform:numa.h",
|
||||
"//tensorflow/core/platform:snappy.h",
|
||||
],
|
||||
defines = ["TF_USE_SNAPPY"],
|
||||
copts = tf_copts(),
|
||||
deps = [
|
||||
"//tensorflow/core/platform",
|
||||
|
Loading…
Reference in New Issue
Block a user