linkstatic = 1,
visibility = ["//visibility:public"],
deps = [
+ "//tensorflow/core:core_cpu_impl",
"//tensorflow/core:framework_internal_impl",
+ "//tensorflow/core:gpu_runtime_impl",
+ "//tensorflow/core/grappler/optimizers:custom_graph_optimizer_registry_impl",
"//tensorflow/core:lib_internal_impl",
- "//tensorflow/core:core_cpu_impl",
"//tensorflow/stream_executor:stream_executor_impl",
- "//tensorflow/core:gpu_runtime_impl",
] + tf_additional_binary_deps(),
)
"//tensorflow/core:platform/default/build_config.bzl",
"tf_protos_grappler",
)
+load(
+ "//tensorflow/core:platform/default/build_config_root.bzl",
+ "if_static",
+)
cc_library(
name = "static_schedule",
],
)
+# This rule is header-only unless the build is static (--config=monolithic). Its
+# implementation is included directly in the framework shared object.
cc_library(
name = "custom_graph_optimizer_registry",
- srcs = ["custom_graph_optimizer_registry.cc"],
hdrs = ["custom_graph_optimizer_registry.h"],
visibility = ["//visibility:public"],
deps = [
":custom_graph_optimizer",
"//tensorflow/core:lib",
+ ] + if_static(
+ [":custom_graph_optimizer_registry_impl"],
+ ),
+)
+
+# This rule contains static variables for the optimizer registry. Do not depend
+# on it directly; use :custom_graph_optimizer_registry, and link against
+# libtensorflow_framework.so for the registry symbols.
+cc_library(
+ name = "custom_graph_optimizer_registry_impl",
+ srcs = ["custom_graph_optimizer_registry.cc"],
+ hdrs = ["custom_graph_optimizer_registry.h"],
+ visibility = ["//tensorflow:__subpackages__"],
+ deps = [
+ ":custom_graph_optimizer",
+ "//tensorflow/core:lib",
],
)