Prevent unnecessary copies of oneDNN in .so files.

This commit is contained in:
ag.ramesh 2020-11-05 07:24:15 -08:00 committed by Penporn Koanantakool
parent 5e38165d02
commit ab2f4b7183
4 changed files with 5 additions and 15 deletions

View File

@ -129,7 +129,6 @@ load("@local_config_tensorrt//:build_defs.bzl", "if_tensorrt")
load( load(
"//third_party/mkl:build_defs.bzl", "//third_party/mkl:build_defs.bzl",
"if_mkl", "if_mkl",
"mkl_deps",
) )
package( package(
@ -1722,7 +1721,7 @@ tf_cuda_library(
] + if_static( ] + if_static(
extra_deps = ["@com_google_protobuf//:protobuf"], extra_deps = ["@com_google_protobuf//:protobuf"],
otherwise = ["@com_google_protobuf//:protobuf_headers"], otherwise = ["@com_google_protobuf//:protobuf_headers"],
) + mkl_deps(), ),
alwayslink = 1, alwayslink = 1,
) )

View File

@ -12,10 +12,6 @@ load(
"//tensorflow/core/platform:build_config_root.bzl", "//tensorflow/core/platform:build_config_root.bzl",
"if_static", "if_static",
) )
load(
"//third_party/mkl:build_defs.bzl",
"mkl_deps",
)
package( package(
licenses = ["notice"], # Apache 2.0 licenses = ["notice"], # Apache 2.0
@ -638,7 +634,7 @@ cc_library(
"//tensorflow/core/grappler/costs:virtual_placer", "//tensorflow/core/grappler/costs:virtual_placer",
"@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:flat_hash_set",
] + mkl_deps(), ],
) )
tf_cuda_cc_test( tf_cuda_cc_test(

View File

@ -25,10 +25,6 @@ load("//tensorflow:tensorflow.bzl", "get_compatible_with_portable")
# buildifier: disable=same-origin-load # buildifier: disable=same-origin-load
load("//tensorflow:tensorflow.bzl", "tf_version_info_genrule") load("//tensorflow:tensorflow.bzl", "tf_version_info_genrule")
load(
"//third_party/mkl:build_defs.bzl",
"mkl_deps",
)
load( load(
"//tensorflow/core/platform:build_config_root.bzl", "//tensorflow/core/platform:build_config_root.bzl",
"if_static", "if_static",
@ -707,7 +703,7 @@ tf_cuda_only_cc_test(
"//tensorflow/core:test", "//tensorflow/core:test",
"//tensorflow/core:test_main", "//tensorflow/core:test_main",
"//third_party/eigen3", "//third_party/eigen3",
] + mkl_deps(), ],
) )
tf_cc_tests( tf_cc_tests(

View File

@ -39,7 +39,6 @@ load(
"if_enable_mkl", "if_enable_mkl",
"if_mkl", "if_mkl",
"if_mkl_ml", "if_mkl_ml",
"mkl_deps",
) )
load( load(
"//third_party/mkl_dnn:build_defs.bzl", "//third_party/mkl_dnn:build_defs.bzl",
@ -1270,7 +1269,7 @@ def tf_cc_test_mkl(
"-lm", "-lm",
], ],
}) + _rpath_linkopts(src_to_test_name(src)), }) + _rpath_linkopts(src_to_test_name(src)),
deps = deps + tf_binary_dynamic_kernel_deps(kernels) + mkl_deps(), deps = deps + tf_binary_dynamic_kernel_deps(kernels) + if_mkl_ml(["//third_party/mkl:intel_binary_blob"]),
data = data + tf_binary_dynamic_kernel_dsos(), data = data + tf_binary_dynamic_kernel_dsos(),
exec_properties = tf_exec_properties({"tags": tags}), exec_properties = tf_exec_properties({"tags": tags}),
linkstatic = linkstatic, linkstatic = linkstatic,
@ -2677,7 +2676,7 @@ def tf_python_pybind_extension(
features = features, features = features,
copts = copts, copts = copts,
hdrs = hdrs, hdrs = hdrs,
deps = deps + tf_binary_pybind_deps() + mkl_deps(), deps = deps + tf_binary_pybind_deps() + if_mkl_ml(["//third_party/mkl:intel_binary_blob"]),
defines = defines, defines = defines,
visibility = visibility, visibility = visibility,
link_in_framework = True, link_in_framework = True,