[Build cleanup] Split "core_cpu_impl" into fine-grained targets (4/n).
This changes moves the remaining modules in "core/graph/..." that depend on modules in "core/common_runtime/..." to "core/common_runtime/", and creates separate fine-grained targets for each of them: * "gradients.{h.cc}" * "graph_def_builder_util.{h,cc}" * "mkl_{layout,tfconversion}_pass.{h,cc}" * "quantize_training.{h,cc}" PiperOrigin-RevId: 308841156 Change-Id: I7774e2498f465290e7addd331625bd91d90acbac
This commit is contained in:
parent
fb1b76c7e3
commit
8ba3108452
|
@ -182,6 +182,7 @@ cc_library_with_android_deps(
|
||||||
deps = [
|
deps = [
|
||||||
"//tensorflow/core:core_cpu",
|
"//tensorflow/core:core_cpu",
|
||||||
"//tensorflow/core:framework",
|
"//tensorflow/core:framework",
|
||||||
|
"//tensorflow/core:graph",
|
||||||
"//tensorflow/core:lib",
|
"//tensorflow/core:lib",
|
||||||
"//tensorflow/core:lib_internal",
|
"//tensorflow/core:lib_internal",
|
||||||
"//tensorflow/core:ops",
|
"//tensorflow/core:ops",
|
||||||
|
|
|
@ -18,12 +18,12 @@ limitations under the License.
|
||||||
#include "absl/container/flat_hash_map.h"
|
#include "absl/container/flat_hash_map.h"
|
||||||
#include "tensorflow/compiler/jit/defs.h"
|
#include "tensorflow/compiler/jit/defs.h"
|
||||||
#include "tensorflow/compiler/jit/test_util.h"
|
#include "tensorflow/compiler/jit/test_util.h"
|
||||||
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
#include "tensorflow/core/framework/node_def_util.h"
|
#include "tensorflow/core/framework/node_def_util.h"
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/graph/algorithm.h"
|
#include "tensorflow/core/graph/algorithm.h"
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
#include "tensorflow/core/graph/graph_constructor.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
#include "tensorflow/core/public/session_options.h"
|
#include "tensorflow/core/public/session_options.h"
|
||||||
|
|
|
@ -21,12 +21,12 @@ limitations under the License.
|
||||||
#include "tensorflow/cc/ops/standard_ops.h"
|
#include "tensorflow/cc/ops/standard_ops.h"
|
||||||
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
|
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
|
||||||
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
|
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
|
||||||
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
#include "tensorflow/core/framework/attr_value.pb.h"
|
#include "tensorflow/core/framework/attr_value.pb.h"
|
||||||
#include "tensorflow/core/framework/function.h"
|
#include "tensorflow/core/framework/function.h"
|
||||||
#include "tensorflow/core/framework/graph_to_functiondef.h"
|
#include "tensorflow/core/framework/graph_to_functiondef.h"
|
||||||
#include "tensorflow/core/framework/node_def_util.h"
|
#include "tensorflow/core/framework/node_def_util.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/graph/algorithm.h"
|
#include "tensorflow/core/graph/algorithm.h"
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
#include "tensorflow/core/graph/graph_constructor.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
#include "tensorflow/compiler/jit/mark_for_compilation_pass_test_helper.h"
|
|
||||||
|
|
||||||
#include "absl/container/flat_hash_map.h"
|
#include "absl/container/flat_hash_map.h"
|
||||||
#include "absl/memory/memory.h"
|
#include "absl/memory/memory.h"
|
||||||
#include "absl/strings/match.h"
|
#include "absl/strings/match.h"
|
||||||
|
@ -28,15 +26,16 @@ limitations under the License.
|
||||||
#include "tensorflow/cc/ops/sendrecv_ops.h"
|
#include "tensorflow/cc/ops/sendrecv_ops.h"
|
||||||
#include "tensorflow/cc/ops/standard_ops.h"
|
#include "tensorflow/cc/ops/standard_ops.h"
|
||||||
#include "tensorflow/compiler/jit/defs.h"
|
#include "tensorflow/compiler/jit/defs.h"
|
||||||
|
#include "tensorflow/compiler/jit/mark_for_compilation_pass_test_helper.h"
|
||||||
#include "tensorflow/compiler/jit/node_matchers.h"
|
#include "tensorflow/compiler/jit/node_matchers.h"
|
||||||
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
|
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
|
||||||
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
|
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
|
||||||
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
#include "tensorflow/core/framework/node_def_util.h"
|
#include "tensorflow/core/framework/node_def_util.h"
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/graph/algorithm.h"
|
#include "tensorflow/core/graph/algorithm.h"
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
#include "tensorflow/core/graph/graph_constructor.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ limitations under the License.
|
||||||
#include "tensorflow/compiler/tf2xla/cc/ops/xla_ops.h"
|
#include "tensorflow/compiler/tf2xla/cc/ops/xla_ops.h"
|
||||||
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
|
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
|
||||||
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
|
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
|
||||||
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
#include "tensorflow/core/framework/function.h"
|
#include "tensorflow/core/framework/function.h"
|
||||||
#include "tensorflow/core/framework/function.pb.h"
|
#include "tensorflow/core/framework/function.pb.h"
|
||||||
#include "tensorflow/core/framework/node_def_util.h"
|
#include "tensorflow/core/framework/node_def_util.h"
|
||||||
|
@ -35,7 +36,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/graph/algorithm.h"
|
#include "tensorflow/core/graph/algorithm.h"
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
#include "tensorflow/core/graph/graph_constructor.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,11 @@ limitations under the License.
|
||||||
#include "tensorflow/compiler/jit/defs.h"
|
#include "tensorflow/compiler/jit/defs.h"
|
||||||
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
|
#include "tensorflow/compiler/tf2xla/xla_op_kernel.h"
|
||||||
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
|
#include "tensorflow/compiler/tf2xla/xla_op_registry.h"
|
||||||
|
#include "tensorflow/core/common_runtime/graph_constructor.h"
|
||||||
#include "tensorflow/core/framework/node_def_util.h"
|
#include "tensorflow/core/framework/node_def_util.h"
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/graph/algorithm.h"
|
#include "tensorflow/core/graph/algorithm.h"
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/lib/strings/str_util.h"
|
#include "tensorflow/core/lib/strings/str_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
|
@ -2796,7 +2796,6 @@ tf_cc_test_mkl(
|
||||||
name = "mkl_related_tests",
|
name = "mkl_related_tests",
|
||||||
size = "small",
|
size = "small",
|
||||||
srcs = [
|
srcs = [
|
||||||
"//tensorflow/core/graph:mkl_related_tests",
|
|
||||||
"//tensorflow/core/util:mkl_util_test_srcs",
|
"//tensorflow/core/util:mkl_util_test_srcs",
|
||||||
],
|
],
|
||||||
linkstatic = 1,
|
linkstatic = 1,
|
||||||
|
|
|
@ -58,7 +58,9 @@ tf_cuda_library(
|
||||||
"device_factory.h",
|
"device_factory.h",
|
||||||
"function.h",
|
"function.h",
|
||||||
"function_optimization_registry.h",
|
"function_optimization_registry.h",
|
||||||
|
"gradients.h",
|
||||||
"graph_constructor.h",
|
"graph_constructor.h",
|
||||||
|
"graph_def_builder_util.h",
|
||||||
"optimization_registry.h",
|
"optimization_registry.h",
|
||||||
"shape_refiner.h",
|
"shape_refiner.h",
|
||||||
"//tensorflow/core/graph:core_cpu_headers",
|
"//tensorflow/core/graph:core_cpu_headers",
|
||||||
|
@ -157,6 +159,7 @@ filegroup(
|
||||||
"function_body.h",
|
"function_body.h",
|
||||||
"function_utils.h",
|
"function_utils.h",
|
||||||
"graph_constructor.h",
|
"graph_constructor.h",
|
||||||
|
"graph_def_builder_util.h",
|
||||||
"graph_optimizer.h",
|
"graph_optimizer.h",
|
||||||
"graph_runner.h",
|
"graph_runner.h",
|
||||||
"inline_function_utils.h",
|
"inline_function_utils.h",
|
||||||
|
@ -173,7 +176,6 @@ filegroup(
|
||||||
tf_cuda_library(
|
tf_cuda_library(
|
||||||
name = "core_cpu_base_no_ops",
|
name = "core_cpu_base_no_ops",
|
||||||
srcs = [
|
srcs = [
|
||||||
"//tensorflow/core/graph:core_cpu_base_no_ops_srcs",
|
|
||||||
"//tensorflow/core/public:session_options.h",
|
"//tensorflow/core/public:session_options.h",
|
||||||
"//tensorflow/core/public:version.h",
|
"//tensorflow/core/public:version.h",
|
||||||
],
|
],
|
||||||
|
@ -194,6 +196,7 @@ tf_cuda_library(
|
||||||
"//third_party/eigen3",
|
"//third_party/eigen3",
|
||||||
] + if_static([
|
] + if_static([
|
||||||
":graph_constructor",
|
":graph_constructor",
|
||||||
|
":graph_def_builder_util",
|
||||||
"@com_google_absl//absl/algorithm:container",
|
"@com_google_absl//absl/algorithm:container",
|
||||||
"@com_google_absl//absl/strings",
|
"@com_google_absl//absl/strings",
|
||||||
]),
|
]),
|
||||||
|
@ -225,6 +228,8 @@ filegroup(
|
||||||
"executor.h",
|
"executor.h",
|
||||||
"executor_factory.h",
|
"executor_factory.h",
|
||||||
"function_optimization_registry.h",
|
"function_optimization_registry.h",
|
||||||
|
"graph_optimizer.h",
|
||||||
|
"gradients.h",
|
||||||
"input_colocation_exemption_registry.h",
|
"input_colocation_exemption_registry.h",
|
||||||
"isolate_placer_inspection_required_ops_pass.h",
|
"isolate_placer_inspection_required_ops_pass.h",
|
||||||
"local_device.h",
|
"local_device.h",
|
||||||
|
@ -236,12 +241,14 @@ filegroup(
|
||||||
"lower_while_op.h",
|
"lower_while_op.h",
|
||||||
"memory_types.h",
|
"memory_types.h",
|
||||||
"mkl_cpu_allocator.h",
|
"mkl_cpu_allocator.h",
|
||||||
|
"mkl_layout_pass.h",
|
||||||
"optimization_registry.h",
|
"optimization_registry.h",
|
||||||
"partitioning_utils.h",
|
"partitioning_utils.h",
|
||||||
"placer.h",
|
"placer.h",
|
||||||
"process_util.h",
|
"process_util.h",
|
||||||
"inspecting_placer.h",
|
"inspecting_placer.h",
|
||||||
"profile_handler.h",
|
"profile_handler.h",
|
||||||
|
"quantize_training.h",
|
||||||
"renamed_device.h",
|
"renamed_device.h",
|
||||||
"rendezvous_mgr.h",
|
"rendezvous_mgr.h",
|
||||||
"rendezvous_util.h",
|
"rendezvous_util.h",
|
||||||
|
@ -256,7 +263,6 @@ filegroup(
|
||||||
"threadpool_device.h",
|
"threadpool_device.h",
|
||||||
"process_state.h",
|
"process_state.h",
|
||||||
"pool_allocator.h",
|
"pool_allocator.h",
|
||||||
"//tensorflow/core/graph:core_cpu_lib_headers",
|
|
||||||
] + if_mkl(["//tensorflow/core/graph:mkl_graph_util_header"]),
|
] + if_mkl(["//tensorflow/core/graph:mkl_graph_util_header"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -606,6 +612,23 @@ cc_library(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "gradients",
|
||||||
|
srcs = ["gradients.cc"],
|
||||||
|
hdrs = ["gradients.h"],
|
||||||
|
deps = [
|
||||||
|
":device",
|
||||||
|
":executor",
|
||||||
|
":graph_constructor",
|
||||||
|
":graph_optimizer",
|
||||||
|
"//tensorflow/core:framework",
|
||||||
|
"//tensorflow/core:graph",
|
||||||
|
"//tensorflow/core:lib",
|
||||||
|
"//tensorflow/core:lib_internal",
|
||||||
|
"//tensorflow/core:protos_all_cc",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
# This library also includes "eval_const_tensor", "graph_runner", and
|
# This library also includes "eval_const_tensor", "graph_runner", and
|
||||||
# "shape_refiner", because there are circular dependencies between these
|
# "shape_refiner", because there are circular dependencies between these
|
||||||
# modules.
|
# modules.
|
||||||
|
@ -646,6 +669,18 @@ cc_library(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "graph_def_builder_util",
|
||||||
|
srcs = ["graph_def_builder_util.cc"],
|
||||||
|
hdrs = ["graph_def_builder_util.h"],
|
||||||
|
copts = tf_copts(),
|
||||||
|
deps = [
|
||||||
|
":graph_constructor",
|
||||||
|
"//tensorflow/core:graph",
|
||||||
|
"//tensorflow/core:lib",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "graph_optimizer",
|
name = "graph_optimizer",
|
||||||
srcs = ["graph_optimizer.cc"],
|
srcs = ["graph_optimizer.cc"],
|
||||||
|
@ -793,6 +828,36 @@ cc_library(
|
||||||
] + mkl_deps(),
|
] + mkl_deps(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "mkl_layout_pass",
|
||||||
|
srcs = ["mkl_layout_pass.cc"],
|
||||||
|
hdrs = ["mkl_layout_pass.h"],
|
||||||
|
copts = tf_copts(),
|
||||||
|
deps = [
|
||||||
|
":optimization_registry",
|
||||||
|
"//tensorflow/core:framework",
|
||||||
|
"//tensorflow/core:framework_internal",
|
||||||
|
"//tensorflow/core:graph",
|
||||||
|
"//tensorflow/core:lib",
|
||||||
|
] + mkl_deps(),
|
||||||
|
alwayslink = 1,
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "mkl_tfconversion_pass",
|
||||||
|
srcs = ["mkl_tfconversion_pass.cc"],
|
||||||
|
hdrs = ["mkl_tfconversion_pass.h"],
|
||||||
|
copts = tf_copts(),
|
||||||
|
deps = [
|
||||||
|
":optimization_registry",
|
||||||
|
"//tensorflow/core:framework",
|
||||||
|
"//tensorflow/core:framework_internal",
|
||||||
|
"//tensorflow/core:graph",
|
||||||
|
"//tensorflow/core:lib",
|
||||||
|
] + mkl_deps(),
|
||||||
|
alwayslink = 1,
|
||||||
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "optimization_registry",
|
name = "optimization_registry",
|
||||||
srcs = ["optimization_registry.cc"],
|
srcs = ["optimization_registry.cc"],
|
||||||
|
@ -923,6 +988,32 @@ cc_library(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "quantize_training_hdrs",
|
||||||
|
srcs = [
|
||||||
|
"quantize_training.h",
|
||||||
|
],
|
||||||
|
visibility = [
|
||||||
|
"//tensorflow/python:__pkg__",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
cc_library(
|
||||||
|
name = "quantize_training",
|
||||||
|
srcs = ["quantize_training.cc"],
|
||||||
|
hdrs = [":quantize_training_hdrs"],
|
||||||
|
copts = tf_copts(),
|
||||||
|
deps = [
|
||||||
|
":executor",
|
||||||
|
":graph_constructor",
|
||||||
|
":memory_types",
|
||||||
|
":session_options",
|
||||||
|
"//tensorflow/core:framework",
|
||||||
|
"//tensorflow/core:graph",
|
||||||
|
"//tensorflow/core:lib",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "renamed_device",
|
name = "renamed_device",
|
||||||
srcs = ["renamed_device.cc"],
|
srcs = ["renamed_device.cc"],
|
||||||
|
@ -1215,7 +1306,6 @@ tf_cuda_library(
|
||||||
"placer_inspection_required_ops_utils.cc",
|
"placer_inspection_required_ops_utils.cc",
|
||||||
"placer_inspection_required_ops_utils.h",
|
"placer_inspection_required_ops_utils.h",
|
||||||
"process_function_library_runtime.cc",
|
"process_function_library_runtime.cc",
|
||||||
"//tensorflow/core/graph:core_cpu_impl_srcs",
|
|
||||||
],
|
],
|
||||||
hdrs = [":core_cpu_lib_headers"],
|
hdrs = [":core_cpu_lib_headers"],
|
||||||
copts = tf_copts(),
|
copts = tf_copts(),
|
||||||
|
@ -1226,6 +1316,7 @@ tf_cuda_library(
|
||||||
":executor_factory",
|
":executor_factory",
|
||||||
":function_body",
|
":function_body",
|
||||||
":function_optimization_registry",
|
":function_optimization_registry",
|
||||||
|
":gradients",
|
||||||
":graph_constructor",
|
":graph_constructor",
|
||||||
":graph_optimizer",
|
":graph_optimizer",
|
||||||
":graph_view",
|
":graph_view",
|
||||||
|
@ -1285,12 +1376,15 @@ tf_cuda_library(
|
||||||
":device_resolver_local",
|
":device_resolver_local",
|
||||||
":device_set",
|
":device_set",
|
||||||
":entry",
|
":entry",
|
||||||
|
":graph_def_builder_util",
|
||||||
":graph_view",
|
":graph_view",
|
||||||
":hierarchical_tree_broadcaster",
|
":hierarchical_tree_broadcaster",
|
||||||
":input_colocation_exemption_registry",
|
":input_colocation_exemption_registry",
|
||||||
":local_device",
|
":local_device",
|
||||||
":memory_types",
|
":memory_types",
|
||||||
":mkl_cpu_allocator",
|
":mkl_cpu_allocator",
|
||||||
|
":mkl_layout_pass",
|
||||||
|
":mkl_tfconversion_pass",
|
||||||
":optimization_registry",
|
":optimization_registry",
|
||||||
":parallel_concat_optimizer",
|
":parallel_concat_optimizer",
|
||||||
":partitioning_utils",
|
":partitioning_utils",
|
||||||
|
@ -1299,6 +1393,7 @@ tf_cuda_library(
|
||||||
":process_state",
|
":process_state",
|
||||||
":process_util",
|
":process_util",
|
||||||
":profile_handler",
|
":profile_handler",
|
||||||
|
":quantize_training",
|
||||||
":renamed_device",
|
":renamed_device",
|
||||||
":rendezvous_mgr",
|
":rendezvous_mgr",
|
||||||
":rendezvous_util",
|
":rendezvous_util",
|
||||||
|
@ -2268,3 +2363,80 @@ tf_cc_test(
|
||||||
"//tensorflow/core:testlib",
|
"//tensorflow/core:testlib",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
tf_cc_test_mkl(
|
||||||
|
name = "mkl_related_tests",
|
||||||
|
size = "small",
|
||||||
|
srcs = [
|
||||||
|
"mkl_layout_pass_test.cc",
|
||||||
|
"mkl_tfconversion_pass_test.cc",
|
||||||
|
],
|
||||||
|
linkstatic = 1,
|
||||||
|
deps = [
|
||||||
|
":core",
|
||||||
|
":core_cpu",
|
||||||
|
":core_cpu_internal",
|
||||||
|
":direct_session_internal",
|
||||||
|
"//tensorflow/core:framework",
|
||||||
|
"//tensorflow/core:framework_internal",
|
||||||
|
"//tensorflow/core:lib",
|
||||||
|
"//tensorflow/core:lib_internal",
|
||||||
|
"//tensorflow/core:ops",
|
||||||
|
"//tensorflow/core:protos_all_cc",
|
||||||
|
"//tensorflow/core:test",
|
||||||
|
"//tensorflow/core:test_main",
|
||||||
|
"//tensorflow/core:testlib",
|
||||||
|
"//tensorflow/cc:cc_ops",
|
||||||
|
"//tensorflow/cc:scope",
|
||||||
|
"//tensorflow/cc:sendrecv_ops",
|
||||||
|
"//tensorflow/core/kernels:ops_util",
|
||||||
|
"//third_party/eigen3",
|
||||||
|
] + if_mkl([
|
||||||
|
"//tensorflow/core/kernels:mkl_aggregate_ops",
|
||||||
|
"//tensorflow/core/kernels:mkl_batch_matmul_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_concat_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_conv_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_cwise_ops_common",
|
||||||
|
"//tensorflow/core/kernels:mkl_dequantize_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_fused_batch_norm_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_identity_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_input_conversion_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_lrn_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_matmul_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_pooling_ops",
|
||||||
|
"//tensorflow/core/kernels:mkl_qmatmul_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_quantize_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_relu_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_reshape_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_slice_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_softmax_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_tfconv_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_transpose_op",
|
||||||
|
"//tensorflow/core/kernels:mkl_tmp_bf16_ops",
|
||||||
|
]),
|
||||||
|
)
|
||||||
|
|
||||||
|
# TODO(bmzhao): Refactor this target to use granular dependencies
|
||||||
|
# after stage 4 of the TF build refactor is complete:
|
||||||
|
# https://github.com/tensorflow/community/pull/179
|
||||||
|
tf_cc_test(
|
||||||
|
name = "quantize_training_test",
|
||||||
|
srcs = ["quantize_training_test.cc"],
|
||||||
|
deps = [
|
||||||
|
":core_cpu",
|
||||||
|
":core_cpu_internal",
|
||||||
|
":direct_session_internal",
|
||||||
|
"//tensorflow/core",
|
||||||
|
"//tensorflow/core:all_kernels",
|
||||||
|
"//tensorflow/core:framework",
|
||||||
|
"//tensorflow/core:framework_internal",
|
||||||
|
"//tensorflow/core:lib",
|
||||||
|
"//tensorflow/core:lib_internal",
|
||||||
|
"//tensorflow/core:ops",
|
||||||
|
"//tensorflow/core:protos_all_cc",
|
||||||
|
"//tensorflow/core:test",
|
||||||
|
"//tensorflow/core:test_main",
|
||||||
|
"//tensorflow/core:testlib",
|
||||||
|
"//tensorflow/core/util:protos_test_cc",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
|
@ -17,8 +17,8 @@ limitations under the License.
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "tensorflow/core/common_runtime/eager/eager_op_rewrite_registry.h"
|
#include "tensorflow/core/common_runtime/eager/eager_op_rewrite_registry.h"
|
||||||
|
#include "tensorflow/core/common_runyime/mkl_layout_pass.h"
|
||||||
#include "tensorflow/core/graph/mkl_graph_util.h"
|
#include "tensorflow/core/graph/mkl_graph_util.h"
|
||||||
#include "tensorflow/core/graph/mkl_layout_pass.h"
|
|
||||||
#include "tensorflow/core/lib/core/status.h"
|
#include "tensorflow/core/lib/core/status.h"
|
||||||
#include "tensorflow/core/util/mkl_util.h"
|
#include "tensorflow/core/util/mkl_util.h"
|
||||||
#include "tensorflow/core/util/util.h"
|
#include "tensorflow/core/util/util.h"
|
||||||
|
|
|
@ -24,6 +24,7 @@ limitations under the License.
|
||||||
#include "tensorflow/core/common_runtime/device.h"
|
#include "tensorflow/core/common_runtime/device.h"
|
||||||
#include "tensorflow/core/common_runtime/executor.h"
|
#include "tensorflow/core/common_runtime/executor.h"
|
||||||
#include "tensorflow/core/common_runtime/executor_factory.h"
|
#include "tensorflow/core/common_runtime/executor_factory.h"
|
||||||
|
#include "tensorflow/core/common_runtime/gradients.h"
|
||||||
#include "tensorflow/core/common_runtime/graph_constructor.h"
|
#include "tensorflow/core/common_runtime/graph_constructor.h"
|
||||||
#include "tensorflow/core/common_runtime/graph_optimizer.h"
|
#include "tensorflow/core/common_runtime/graph_optimizer.h"
|
||||||
#include "tensorflow/core/common_runtime/inline_function_utils.h"
|
#include "tensorflow/core/common_runtime/inline_function_utils.h"
|
||||||
|
@ -38,7 +39,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/versions.pb.h"
|
#include "tensorflow/core/framework/versions.pb.h"
|
||||||
#include "tensorflow/core/graph/algorithm.h"
|
#include "tensorflow/core/graph/algorithm.h"
|
||||||
#include "tensorflow/core/graph/control_flow.h"
|
#include "tensorflow/core/graph/control_flow.h"
|
||||||
#include "tensorflow/core/graph/gradients.h"
|
|
||||||
#include "tensorflow/core/graph/node_builder.h"
|
#include "tensorflow/core/graph/node_builder.h"
|
||||||
#include "tensorflow/core/graph/optimizer_cse.h"
|
#include "tensorflow/core/graph/optimizer_cse.h"
|
||||||
#include "tensorflow/core/lib/core/threadpool.h"
|
#include "tensorflow/core/lib/core/threadpool.h"
|
||||||
|
|
|
@ -13,11 +13,14 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
|
#include "tensorflow/core/common_runtime/gradients.h"
|
||||||
|
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "tensorflow/core/common_runtime/device.h"
|
#include "tensorflow/core/common_runtime/device.h"
|
||||||
#include "tensorflow/core/common_runtime/executor.h"
|
#include "tensorflow/core/common_runtime/executor.h"
|
||||||
|
#include "tensorflow/core/common_runtime/graph_constructor.h"
|
||||||
#include "tensorflow/core/common_runtime/graph_optimizer.h"
|
#include "tensorflow/core/common_runtime/graph_optimizer.h"
|
||||||
#include "tensorflow/core/framework/function.h"
|
#include "tensorflow/core/framework/function.h"
|
||||||
#include "tensorflow/core/framework/node_def.pb.h"
|
#include "tensorflow/core/framework/node_def.pb.h"
|
||||||
|
@ -25,8 +28,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/framework/op_kernel.h"
|
#include "tensorflow/core/framework/op_kernel.h"
|
||||||
#include "tensorflow/core/graph/algorithm.h"
|
#include "tensorflow/core/graph/algorithm.h"
|
||||||
#include "tensorflow/core/graph/gradients.h"
|
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
|
||||||
#include "tensorflow/core/graph/optimizer_cse.h"
|
#include "tensorflow/core/graph/optimizer_cse.h"
|
||||||
#include "tensorflow/core/lib/gtl/map_util.h"
|
#include "tensorflow/core/lib/gtl/map_util.h"
|
||||||
#include "tensorflow/core/platform/macros.h"
|
#include "tensorflow/core/platform/macros.h"
|
|
@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
#ifndef TENSORFLOW_CORE_GRAPH_GRADIENTS_H_
|
#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_GRADIENTS_H_
|
||||||
#define TENSORFLOW_CORE_GRAPH_GRADIENTS_H_
|
#define TENSORFLOW_CORE_COMMON_RUNTIME_GRADIENTS_H_
|
||||||
|
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
#include "tensorflow/core/lib/core/status.h"
|
#include "tensorflow/core/lib/core/status.h"
|
||||||
|
@ -55,4 +55,4 @@ Status AddSymbolicGradients(gtl::ArraySlice<NodeOut> y_node_outputs,
|
||||||
|
|
||||||
} // namespace tensorflow
|
} // namespace tensorflow
|
||||||
|
|
||||||
#endif // TENSORFLOW_CORE_GRAPH_GRADIENTS_H_
|
#endif // TENSORFLOW_CORE_COMMON_RUNTIME_GRADIENTS_H_
|
|
@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
|
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
#include "tensorflow/core/common_runtime/graph_constructor.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
|
|
@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
#ifndef TENSORFLOW_CORE_GRAPH_GRAPH_DEF_BUILDER_UTIL_H_
|
#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_GRAPH_DEF_BUILDER_UTIL_H_
|
||||||
#define TENSORFLOW_CORE_GRAPH_GRAPH_DEF_BUILDER_UTIL_H_
|
#define TENSORFLOW_CORE_COMMON_RUNTIME_GRAPH_DEF_BUILDER_UTIL_H_
|
||||||
|
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/lib/core/status.h"
|
#include "tensorflow/core/lib/core/status.h"
|
||||||
|
@ -32,4 +32,4 @@ Status GraphDefBuilderToGraph(const GraphDefBuilder& builder, Graph* graph);
|
||||||
|
|
||||||
} // namespace tensorflow
|
} // namespace tensorflow
|
||||||
|
|
||||||
#endif // TENSORFLOW_CORE_GRAPH_GRAPH_DEF_BUILDER_UTIL_H_
|
#endif // TENSORFLOW_CORE_COMMON_RUNTIME_GRAPH_DEF_BUILDER_UTIL_H_
|
|
@ -27,7 +27,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
#include "tensorflow/core/util/equal_graph_def.h"
|
#include "tensorflow/core/util/equal_graph_def.h"
|
||||||
|
|
|
@ -28,7 +28,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/framework/tensor_testutil.h"
|
#include "tensorflow/core/framework/tensor_testutil.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/lib/strings/str_util.h"
|
#include "tensorflow/core/lib/strings/str_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
|
@ -28,7 +28,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/framework/tensor_testutil.h"
|
#include "tensorflow/core/framework/tensor_testutil.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/lib/strings/str_util.h"
|
#include "tensorflow/core/lib/strings/str_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
|
@ -28,7 +28,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/framework/tensor_testutil.h"
|
#include "tensorflow/core/framework/tensor_testutil.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/lib/strings/str_util.h"
|
#include "tensorflow/core/lib/strings/str_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
|
@ -28,7 +28,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/framework/tensor_testutil.h"
|
#include "tensorflow/core/framework/tensor_testutil.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/lib/strings/str_util.h"
|
#include "tensorflow/core/lib/strings/str_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
|
@ -26,7 +26,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/node_def_util.h"
|
#include "tensorflow/core/framework/node_def_util.h"
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/lib/strings/str_util.h"
|
#include "tensorflow/core/lib/strings/str_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
||||||
// all over the place, we should log an error and execute the original graph.
|
// all over the place, we should log an error and execute the original graph.
|
||||||
#ifdef INTEL_MKL
|
#ifdef INTEL_MKL
|
||||||
|
|
||||||
#include "tensorflow/core/graph/mkl_layout_pass.h"
|
#include "tensorflow/core/common_runtime/mkl_layout_pass.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <functional>
|
#include <functional>
|
|
@ -15,8 +15,8 @@ limitations under the License.
|
||||||
|
|
||||||
// A graph pass that rewrites graph for propagating MKL layout as a tensor
|
// A graph pass that rewrites graph for propagating MKL layout as a tensor
|
||||||
|
|
||||||
#ifndef TENSORFLOW_CORE_GRAPH_MKL_LAYOUT_PASS_H_
|
#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_MKL_LAYOUT_PASS_H_
|
||||||
#define TENSORFLOW_CORE_GRAPH_MKL_LAYOUT_PASS_H_
|
#define TENSORFLOW_CORE_COMMON_RUNTIME_MKL_LAYOUT_PASS_H_
|
||||||
|
|
||||||
#ifdef INTEL_MKL
|
#ifdef INTEL_MKL
|
||||||
|
|
||||||
|
@ -33,4 +33,4 @@ extern bool RunMklLayoutRewritePass(std::unique_ptr<Graph>* g);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // TENSORFLOW_CORE_GRAPH_MKL_LAYOUT_PASS_H_
|
#endif // TENSORFLOW_CORE_COMMON_RUNTIME_MKL_LAYOUT_PASS_H_
|
|
@ -15,15 +15,15 @@ limitations under the License.
|
||||||
|
|
||||||
#if defined(INTEL_MKL) && defined(ENABLE_MKL)
|
#if defined(INTEL_MKL) && defined(ENABLE_MKL)
|
||||||
|
|
||||||
#include "tensorflow/core/graph/mkl_layout_pass.h"
|
#include "tensorflow/core/common_runtime/mkl_layout_pass.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "tensorflow/core/common_runtime/graph_constructor.h"
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/framework/tensor.h"
|
#include "tensorflow/core/framework/tensor.h"
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
|
||||||
#include "tensorflow/core/graph/mkl_graph_util.h"
|
#include "tensorflow/core/graph/mkl_graph_util.h"
|
||||||
#include "tensorflow/core/graph/testlib.h"
|
#include "tensorflow/core/graph/testlib.h"
|
||||||
#include "tensorflow/core/kernels/ops_util.h"
|
#include "tensorflow/core/kernels/ops_util.h"
|
|
@ -15,6 +15,8 @@ limitations under the License.
|
||||||
|
|
||||||
#ifdef INTEL_MKL
|
#ifdef INTEL_MKL
|
||||||
|
|
||||||
|
#include "tensorflow/core/common_runtime/mkl_tfconversion_pass.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
@ -26,6 +28,7 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/node_def_util.h"
|
#include "tensorflow/core/framework/node_def_util.h"
|
||||||
#include "tensorflow/core/graph/algorithm.h"
|
#include "tensorflow/core/graph/algorithm.h"
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
|
#include "tensorflow/core/graph/mkl_graph_util.h"
|
||||||
#include "tensorflow/core/graph/node_builder.h"
|
#include "tensorflow/core/graph/node_builder.h"
|
||||||
#include "tensorflow/core/lib/core/status.h"
|
#include "tensorflow/core/lib/core/status.h"
|
||||||
#include "tensorflow/core/lib/gtl/map_util.h"
|
#include "tensorflow/core/lib/gtl/map_util.h"
|
||||||
|
@ -33,8 +36,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/platform/logging.h"
|
#include "tensorflow/core/platform/logging.h"
|
||||||
#include "tensorflow/core/util/util.h"
|
#include "tensorflow/core/util/util.h"
|
||||||
|
|
||||||
#include "tensorflow/core/graph/mkl_graph_util.h"
|
|
||||||
#include "tensorflow/core/graph/mkl_tfconversion_pass.h"
|
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
|
|
|
@ -15,8 +15,8 @@ limitations under the License.
|
||||||
|
|
||||||
// An optimization pass that inserts MklToTf conversion nodes in the graph
|
// An optimization pass that inserts MklToTf conversion nodes in the graph
|
||||||
|
|
||||||
#ifndef TENSORFLOW_CORE_GRAPH_MKL_TFCONVERSION_PASS_H_
|
#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_MKL_TFCONVERSION_PASS_H_
|
||||||
#define TENSORFLOW_CORE_GRAPH_MKL_TFCONVERSION_PASS_H_
|
#define TENSORFLOW_CORE_COMMON_RUNTIME_MKL_TFCONVERSION_PASS_H_
|
||||||
|
|
||||||
#ifdef INTEL_MKL
|
#ifdef INTEL_MKL
|
||||||
|
|
||||||
|
@ -37,4 +37,4 @@ extern bool InsertMklToTfConversionNodes(std::unique_ptr<Graph>* g);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // TENSORFLOW_CORE_GRAPH_MKL_TFCONVERSION_PASS_H_
|
#endif // TENSORFLOW_CORE_COMMON_RUNTIME_MKL_TFCONVERSION_PASS_H_
|
|
@ -15,16 +15,16 @@ limitations under the License.
|
||||||
|
|
||||||
#if defined(INTEL_MKL) && defined(ENABLE_MKL)
|
#if defined(INTEL_MKL) && defined(ENABLE_MKL)
|
||||||
|
|
||||||
#include "tensorflow/core/graph/mkl_tfconversion_pass.h"
|
#include "tensorflow/core/common_runtime/mkl_tfconversion_pass.h"
|
||||||
#include "tensorflow/core/graph/mkl_graph_util.h"
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "tensorflow/core/common_runtime/graph_constructor.h"
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/framework/tensor.h"
|
#include "tensorflow/core/framework/tensor.h"
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
#include "tensorflow/core/graph/mkl_graph_util.h"
|
||||||
#include "tensorflow/core/graph/testlib.h"
|
#include "tensorflow/core/graph/testlib.h"
|
||||||
#include "tensorflow/core/kernels/ops_util.h"
|
#include "tensorflow/core/kernels/ops_util.h"
|
||||||
#include "tensorflow/core/lib/random/simple_philox.h"
|
#include "tensorflow/core/lib/random/simple_philox.h"
|
|
@ -24,7 +24,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/node_def_builder.h"
|
#include "tensorflow/core/framework/node_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ limitations under the License.
|
||||||
#include "tensorflow/core/common_runtime/device_factory.h"
|
#include "tensorflow/core/common_runtime/device_factory.h"
|
||||||
#include "tensorflow/core/common_runtime/device_set.h"
|
#include "tensorflow/core/common_runtime/device_set.h"
|
||||||
#include "tensorflow/core/common_runtime/graph_constructor.h"
|
#include "tensorflow/core/common_runtime/graph_constructor.h"
|
||||||
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
#include "tensorflow/core/common_runtime/optimization_registry.h"
|
#include "tensorflow/core/common_runtime/optimization_registry.h"
|
||||||
#include "tensorflow/core/framework/device_attributes.pb.h"
|
#include "tensorflow/core/framework/device_attributes.pb.h"
|
||||||
#include "tensorflow/core/framework/function.h"
|
#include "tensorflow/core/framework/function.h"
|
||||||
|
@ -36,7 +37,6 @@ limitations under the License.
|
||||||
#include "tensorflow/core/framework/types.pb.h"
|
#include "tensorflow/core/framework/types.pb.h"
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/errors.h"
|
#include "tensorflow/core/lib/core/errors.h"
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/lib/strings/str_util.h"
|
#include "tensorflow/core/lib/strings/str_util.h"
|
||||||
|
|
|
@ -13,16 +13,14 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
|
#include "tensorflow/core/common_runtime/quantize_training.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "tensorflow/core/graph/quantize_training.h"
|
|
||||||
|
|
||||||
#include "tensorflow/core/common_runtime/executor.h"
|
|
||||||
#include "tensorflow/core/common_runtime/function.h"
|
|
||||||
#include "tensorflow/core/common_runtime/memory_types.h"
|
#include "tensorflow/core/common_runtime/memory_types.h"
|
||||||
#include "tensorflow/core/framework/log_memory.h"
|
#include "tensorflow/core/framework/log_memory.h"
|
||||||
#include "tensorflow/core/framework/op_kernel.h"
|
#include "tensorflow/core/framework/op_kernel.h"
|
|
@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
#ifndef TENSORFLOW_CORE_GRAPH_QUANTIZE_TRAINING_H_
|
#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_QUANTIZE_TRAINING_H_
|
||||||
#define TENSORFLOW_CORE_GRAPH_QUANTIZE_TRAINING_H_
|
#define TENSORFLOW_CORE_COMMON_RUNTIME_QUANTIZE_TRAINING_H_
|
||||||
|
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
|
|
||||||
|
@ -53,4 +53,4 @@ Status DoQuantizeTrainingOnGraphDef(const GraphDef& input_graphdef,
|
||||||
|
|
||||||
} // namespace tensorflow
|
} // namespace tensorflow
|
||||||
|
|
||||||
#endif // TENSORFLOW_CORE_GRAPH_QUANTIZE_TRAINING_H_
|
#endif // TENSORFLOW_CORE_COMMON_RUNTIME_QUANTIZE_TRAINING_H_
|
|
@ -13,13 +13,13 @@ See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
|
#include "tensorflow/core/common_runtime/quantize_training.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "tensorflow/core/graph/quantize_training.h"
|
|
||||||
|
|
||||||
#include "tensorflow/core/common_runtime/device_factory.h"
|
#include "tensorflow/core/common_runtime/device_factory.h"
|
||||||
#include "tensorflow/core/common_runtime/device_mgr.h"
|
#include "tensorflow/core/common_runtime/device_mgr.h"
|
||||||
#include "tensorflow/core/framework/node_def_util.h"
|
#include "tensorflow/core/framework/node_def_util.h"
|
|
@ -18,31 +18,6 @@ cc_library(
|
||||||
hdrs = ["mkl_graph_util.h"],
|
hdrs = ["mkl_graph_util.h"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO(bmzhao): Refactor this target to use granular dependencies
|
|
||||||
# after stage 4 of the TF build refactor is complete:
|
|
||||||
# https://github.com/tensorflow/community/pull/179
|
|
||||||
tf_cc_test(
|
|
||||||
name = "quantize_training_test",
|
|
||||||
srcs = ["quantize_training_test.cc"],
|
|
||||||
deps = [
|
|
||||||
"//tensorflow/core",
|
|
||||||
"//tensorflow/core:all_kernels",
|
|
||||||
"//tensorflow/core:core_cpu",
|
|
||||||
"//tensorflow/core:core_cpu_internal",
|
|
||||||
"//tensorflow/core:direct_session_internal",
|
|
||||||
"//tensorflow/core:framework",
|
|
||||||
"//tensorflow/core:framework_internal",
|
|
||||||
"//tensorflow/core:lib",
|
|
||||||
"//tensorflow/core:lib_internal",
|
|
||||||
"//tensorflow/core:ops",
|
|
||||||
"//tensorflow/core:protos_all_cc",
|
|
||||||
"//tensorflow/core:test",
|
|
||||||
"//tensorflow/core:test_main",
|
|
||||||
"//tensorflow/core:testlib",
|
|
||||||
"//tensorflow/core/util:protos_test_cc",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
tf_cc_test(
|
tf_cc_test(
|
||||||
name = "collective_order_test",
|
name = "collective_order_test",
|
||||||
size = "small",
|
size = "small",
|
||||||
|
@ -69,11 +44,9 @@ filegroup(
|
||||||
srcs = [
|
srcs = [
|
||||||
"algorithm.h",
|
"algorithm.h",
|
||||||
"default_device.h",
|
"default_device.h",
|
||||||
"gradients.h",
|
|
||||||
"graph.h",
|
"graph.h",
|
||||||
"graph_constructor.h",
|
"graph_constructor.h",
|
||||||
"graph_def_builder.h",
|
"graph_def_builder.h",
|
||||||
"graph_def_builder_util.h",
|
|
||||||
"graph_node_util.h",
|
"graph_node_util.h",
|
||||||
"node_builder.h",
|
"node_builder.h",
|
||||||
"validate.h",
|
"validate.h",
|
||||||
|
@ -110,7 +83,7 @@ filegroup(
|
||||||
# Note(bmzhao): This target is a holdover from the GRAPH_HDRS array
|
# Note(bmzhao): This target is a holdover from the GRAPH_HDRS array
|
||||||
# in tensorflow/core/BUILD. This target contains all '.h' files under
|
# in tensorflow/core/BUILD. This target contains all '.h' files under
|
||||||
# tensorflow/core/graph, except for the following:
|
# tensorflow/core/graph, except for the following:
|
||||||
# 'benchmark_testlib.h', 'mkl_graph_util.h', 'gradients.h', 'quantize_training.h'.
|
# 'benchmark_testlib.h'.
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "graph_headers",
|
name = "graph_headers",
|
||||||
srcs = [
|
srcs = [
|
||||||
|
@ -124,11 +97,8 @@ filegroup(
|
||||||
"graph.h",
|
"graph.h",
|
||||||
"graph_constructor.h", # NOTE(mrry): Don't include the .cc since it depends on common_runtime.
|
"graph_constructor.h", # NOTE(mrry): Don't include the .cc since it depends on common_runtime.
|
||||||
"graph_def_builder.h",
|
"graph_def_builder.h",
|
||||||
"graph_def_builder_util.h",
|
|
||||||
"graph_node_util.h",
|
"graph_node_util.h",
|
||||||
"graph_partition.h",
|
"graph_partition.h",
|
||||||
"mkl_layout_pass.h",
|
|
||||||
"mkl_tfconversion_pass.h",
|
|
||||||
"node_builder.h",
|
"node_builder.h",
|
||||||
"optimizer_cse.h",
|
"optimizer_cse.h",
|
||||||
"subgraph.h",
|
"subgraph.h",
|
||||||
|
@ -155,32 +125,6 @@ filegroup(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
|
||||||
name = "core_cpu_lib_headers",
|
|
||||||
srcs = [
|
|
||||||
"gradients.h",
|
|
||||||
"quantize_training.h",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
# This file depends on common_runtime.
|
|
||||||
filegroup(
|
|
||||||
name = "core_cpu_base_no_ops_srcs",
|
|
||||||
srcs = [
|
|
||||||
"graph_def_builder_util.cc",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
filegroup(
|
|
||||||
name = "core_cpu_impl_srcs",
|
|
||||||
srcs = [
|
|
||||||
"gradients.cc",
|
|
||||||
"mkl_layout_pass.cc",
|
|
||||||
"mkl_tfconversion_pass.cc",
|
|
||||||
"quantize_training.cc",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "testlib_headers",
|
name = "testlib_headers",
|
||||||
srcs = [
|
srcs = [
|
||||||
|
@ -218,16 +162,6 @@ filegroup(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
filegroup(
|
|
||||||
name = "quantize_training_hdrs",
|
|
||||||
srcs = [
|
|
||||||
"quantize_training.h",
|
|
||||||
],
|
|
||||||
visibility = [
|
|
||||||
"//tensorflow/python:__pkg__",
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
||||||
filegroup(
|
filegroup(
|
||||||
name = "mobile_srcs_only_runtime",
|
name = "mobile_srcs_only_runtime",
|
||||||
srcs = [
|
srcs = [
|
||||||
|
@ -245,30 +179,20 @@ filegroup(
|
||||||
"default_device.h",
|
"default_device.h",
|
||||||
"edgeset.cc",
|
"edgeset.cc",
|
||||||
"edgeset.h",
|
"edgeset.h",
|
||||||
"gradients.cc",
|
|
||||||
"gradients.h",
|
|
||||||
"graph.cc",
|
"graph.cc",
|
||||||
"graph.h",
|
"graph.h",
|
||||||
"graph_constructor.h",
|
"graph_constructor.h",
|
||||||
"graph_def_builder.cc",
|
"graph_def_builder.cc",
|
||||||
"graph_def_builder.h",
|
"graph_def_builder.h",
|
||||||
"graph_def_builder_util.cc",
|
|
||||||
"graph_def_builder_util.h",
|
|
||||||
"graph_node_util.cc",
|
"graph_node_util.cc",
|
||||||
"graph_node_util.h",
|
"graph_node_util.h",
|
||||||
"graph_partition.cc",
|
"graph_partition.cc",
|
||||||
"graph_partition.h",
|
"graph_partition.h",
|
||||||
"mkl_graph_util.h",
|
"mkl_graph_util.h",
|
||||||
"mkl_layout_pass.cc",
|
|
||||||
"mkl_layout_pass.h",
|
|
||||||
"mkl_tfconversion_pass.cc",
|
|
||||||
"mkl_tfconversion_pass.h",
|
|
||||||
"node_builder.cc",
|
"node_builder.cc",
|
||||||
"node_builder.h",
|
"node_builder.h",
|
||||||
"optimizer_cse.cc",
|
"optimizer_cse.cc",
|
||||||
"optimizer_cse.h",
|
"optimizer_cse.h",
|
||||||
"quantize_training.cc",
|
|
||||||
"quantize_training.h",
|
|
||||||
"subgraph.cc",
|
"subgraph.cc",
|
||||||
"subgraph.h",
|
"subgraph.h",
|
||||||
"tensor_id.cc",
|
"tensor_id.cc",
|
||||||
|
|
|
@ -18,11 +18,11 @@ limitations under the License.
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
#include "tensorflow/core/graph/benchmark_testlib.h"
|
#include "tensorflow/core/graph/benchmark_testlib.h"
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
#include "tensorflow/core/graph/graph_constructor.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/graph/subgraph.h"
|
#include "tensorflow/core/graph/subgraph.h"
|
||||||
#include "tensorflow/core/kernels/ops_util.h"
|
#include "tensorflow/core/kernels/ops_util.h"
|
||||||
#include "tensorflow/core/lib/core/status.h"
|
#include "tensorflow/core/lib/core/status.h"
|
||||||
|
|
|
@ -15,9 +15,9 @@ limitations under the License.
|
||||||
#include "tensorflow/core/graph/collective_order.h"
|
#include "tensorflow/core/graph/collective_order.h"
|
||||||
|
|
||||||
#include <gmock/gmock.h>
|
#include <gmock/gmock.h>
|
||||||
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
#include "tensorflow/core/framework/node_def_builder.h"
|
#include "tensorflow/core/framework/node_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,9 @@ limitations under the License.
|
||||||
|
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
|
|
||||||
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
#include "tensorflow/core/framework/versions.pb.h"
|
#include "tensorflow/core/framework/versions.pb.h"
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/kernels/ops_util.h"
|
#include "tensorflow/core/kernels/ops_util.h"
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
|
@ -18,12 +18,12 @@ limitations under the License.
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "tensorflow/core/common_runtime/graph_def_builder_util.h"
|
||||||
#include "tensorflow/core/framework/graph.pb.h"
|
#include "tensorflow/core/framework/graph.pb.h"
|
||||||
#include "tensorflow/core/framework/partial_tensor_shape.h"
|
#include "tensorflow/core/framework/partial_tensor_shape.h"
|
||||||
#include "tensorflow/core/graph/graph.h"
|
#include "tensorflow/core/graph/graph.h"
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
#include "tensorflow/core/graph/graph_constructor.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder.h"
|
#include "tensorflow/core/graph/graph_def_builder.h"
|
||||||
#include "tensorflow/core/graph/graph_def_builder_util.h"
|
|
||||||
#include "tensorflow/core/kernels/ops_util.h"
|
#include "tensorflow/core/kernels/ops_util.h"
|
||||||
#include "tensorflow/core/lib/core/status.h"
|
#include "tensorflow/core/lib/core/status.h"
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
|
|
|
@ -21,11 +21,11 @@ limitations under the License.
|
||||||
#include "tensorflow/core/common_runtime/device.h"
|
#include "tensorflow/core/common_runtime/device.h"
|
||||||
#include "tensorflow/core/common_runtime/executor.h"
|
#include "tensorflow/core/common_runtime/executor.h"
|
||||||
#include "tensorflow/core/common_runtime/function.h"
|
#include "tensorflow/core/common_runtime/function.h"
|
||||||
|
#include "tensorflow/core/common_runtime/gradients.h"
|
||||||
#include "tensorflow/core/common_runtime/memory_types.h"
|
#include "tensorflow/core/common_runtime/memory_types.h"
|
||||||
#include "tensorflow/core/framework/op.h"
|
#include "tensorflow/core/framework/op.h"
|
||||||
#include "tensorflow/core/framework/register_types.h"
|
#include "tensorflow/core/framework/register_types.h"
|
||||||
#include "tensorflow/core/graph/algorithm.h"
|
#include "tensorflow/core/graph/algorithm.h"
|
||||||
#include "tensorflow/core/graph/gradients.h"
|
|
||||||
#include "tensorflow/core/graph/graph_constructor.h"
|
#include "tensorflow/core/graph/graph_constructor.h"
|
||||||
#include "tensorflow/core/platform/macros.h"
|
#include "tensorflow/core/platform/macros.h"
|
||||||
#include "tensorflow/core/platform/tracing.h"
|
#include "tensorflow/core/platform/tracing.h"
|
||||||
|
|
|
@ -21,11 +21,11 @@ limitations under the License.
|
||||||
#include "tensorflow/cc/ops/array_ops.h"
|
#include "tensorflow/cc/ops/array_ops.h"
|
||||||
#include "tensorflow/cc/ops/const_op.h"
|
#include "tensorflow/cc/ops/const_op.h"
|
||||||
#include "tensorflow/cc/ops/image_ops.h"
|
#include "tensorflow/cc/ops/image_ops.h"
|
||||||
|
#include "tensorflow/core/common_runtime/gradients.h"
|
||||||
#include "tensorflow/core/framework/node_def_builder.h"
|
#include "tensorflow/core/framework/node_def_builder.h"
|
||||||
#include "tensorflow/core/framework/node_def_util.h"
|
#include "tensorflow/core/framework/node_def_util.h"
|
||||||
#include "tensorflow/core/framework/shape_inference_testutil.h"
|
#include "tensorflow/core/framework/shape_inference_testutil.h"
|
||||||
#include "tensorflow/core/framework/tensor_testutil.h"
|
#include "tensorflow/core/framework/tensor_testutil.h"
|
||||||
#include "tensorflow/core/graph/gradients.h"
|
|
||||||
#include "tensorflow/core/kernels/quantization_utils.h"
|
#include "tensorflow/core/kernels/quantization_utils.h"
|
||||||
#include "tensorflow/core/lib/core/status_test_util.h"
|
#include "tensorflow/core/lib/core/status_test_util.h"
|
||||||
#include "tensorflow/core/platform/test.h"
|
#include "tensorflow/core/platform/test.h"
|
||||||
|
|
|
@ -712,7 +712,7 @@ tf_python_pybind_extension(
|
||||||
srcs = [
|
srcs = [
|
||||||
"training/quantize_training_wrapper.cc",
|
"training/quantize_training_wrapper.cc",
|
||||||
],
|
],
|
||||||
hdrs = ["//tensorflow/core/graph:quantize_training_hdrs"],
|
hdrs = ["//tensorflow/core/common_runtime:quantize_training_hdrs"],
|
||||||
module_name = "_pywrap_quantize_training",
|
module_name = "_pywrap_quantize_training",
|
||||||
deps = [
|
deps = [
|
||||||
":pybind11_lib",
|
":pybind11_lib",
|
||||||
|
@ -5952,11 +5952,10 @@ filegroup(
|
||||||
"//tensorflow/c:tf_status_helper", # tfe
|
"//tensorflow/c:tf_status_helper", # tfe
|
||||||
"//tensorflow/compiler/jit:flags", #tfe
|
"//tensorflow/compiler/jit:flags", #tfe
|
||||||
"//tensorflow/compiler/mlir/python:mlir", # mlir
|
"//tensorflow/compiler/mlir/python:mlir", # mlir
|
||||||
"//tensorflow/core/common_runtime:core_cpu_base_no_ops", # tf_session
|
|
||||||
"//tensorflow/core/common_runtime:core_cpu_rump_impl", # quantize_training
|
|
||||||
"//tensorflow/core/common_runtime:device", # device_lib, tfe, tf_session
|
"//tensorflow/core/common_runtime:device", # device_lib, tfe, tf_session
|
||||||
"//tensorflow/core/common_runtime:device_factory", # device_lib, tfe, tf_session
|
"//tensorflow/core/common_runtime:device_factory", # device_lib, tfe, tf_session
|
||||||
"//tensorflow/core/common_runtime:graph_constructor", # tf_session
|
"//tensorflow/core/common_runtime:graph_constructor", # tf_session
|
||||||
|
"//tensorflow/core/common_runtime:quantize_training", # quantize_training
|
||||||
"//tensorflow/core/common_runtime:session_options", # device_lib, tfe, tf_session
|
"//tensorflow/core/common_runtime:session_options", # device_lib, tfe, tf_session
|
||||||
"//tensorflow/core/common_runtime:session_state", # tf_session
|
"//tensorflow/core/common_runtime:session_state", # tf_session
|
||||||
"//tensorflow/core/data/service:server_lib", # server_lib
|
"//tensorflow/core/data/service:server_lib", # server_lib
|
||||||
|
|
|
@ -14,7 +14,7 @@ limitations under the License.
|
||||||
==============================================================================*/
|
==============================================================================*/
|
||||||
|
|
||||||
#include "pybind11/pybind11.h"
|
#include "pybind11/pybind11.h"
|
||||||
#include "tensorflow/core/graph/quantize_training.h"
|
#include "tensorflow/core/common_runtime/quantize_training.h"
|
||||||
#include "tensorflow/python/lib/core/pybind11_lib.h"
|
#include "tensorflow/python/lib/core/pybind11_lib.h"
|
||||||
#include "tensorflow/python/lib/core/pybind11_status.h"
|
#include "tensorflow/python/lib/core/pybind11_status.h"
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ tensorflow::DeviceFactory::ListAllPhysicalDevices
|
||||||
[session_options] # device_lib, tfe, tf_session
|
[session_options] # device_lib, tfe, tf_session
|
||||||
tensorflow::SessionOptions::SessionOptions
|
tensorflow::SessionOptions::SessionOptions
|
||||||
|
|
||||||
[core_cpu_rump_impl] # quantize_training
|
[quantize_training] # quantize_training
|
||||||
tensorflow::DoQuantizeTrainingOnSerializedGraphDef
|
tensorflow::DoQuantizeTrainingOnSerializedGraphDef
|
||||||
|
|
||||||
[session_state] # tf_session
|
[session_state] # tf_session
|
||||||
|
|
Loading…
Reference in New Issue