Split out common_shape_fns and shape_inference into their own targets in
third_party/tensorflow/core/framework/BUILD. Also, split out einsum_op_util, padding and tensor_format in third_party/tensorflow/core/util/BUILD. PiperOrigin-RevId: 288363061 Change-Id: Idfb4d46a7f084ce613b255274ddd4f28110050ab
This commit is contained in:
parent
61593502e4
commit
b6d0218c34
@ -2525,11 +2525,13 @@ tf_cuda_library(
|
||||
"//tensorflow/core/framework:attr_value_proto_text",
|
||||
"//tensorflow/core/framework:attr_value_util",
|
||||
"//tensorflow/core/framework:bfloat16",
|
||||
"//tensorflow/core/framework:common_shape_fns",
|
||||
"//tensorflow/core/framework:node_def_util",
|
||||
"//tensorflow/core/framework:numeric_types",
|
||||
"//tensorflow/core/framework:op_def_builder",
|
||||
"//tensorflow/core/framework:op_def_util",
|
||||
"//tensorflow/core/framework:resource_handle",
|
||||
"//tensorflow/core/framework:shape_inference",
|
||||
"//tensorflow/core/framework:tensor",
|
||||
"//tensorflow/core/framework:tensor_shape",
|
||||
"//tensorflow/core/kernels:bounds_check",
|
||||
@ -2537,8 +2539,11 @@ tf_cuda_library(
|
||||
"//tensorflow/core/profiler/internal:annotation_stack_impl",
|
||||
"//tensorflow/core/profiler/internal:traceme_recorder_impl",
|
||||
"//tensorflow/core/profiler/lib:traceme",
|
||||
"//tensorflow/core/util:einsum_op_util",
|
||||
"//tensorflow/core/util:padding",
|
||||
"//tensorflow/core/util:port",
|
||||
"//tensorflow/core/util:stats_calculator_portable",
|
||||
"//tensorflow/core/util:tensor_format",
|
||||
"//tensorflow/compiler/jit:common",
|
||||
] + if_static(
|
||||
extra_deps = ["@com_google_protobuf//:protobuf"],
|
||||
|
@ -30,7 +30,6 @@ exports_files(
|
||||
"allocator_registry.h",
|
||||
"cancellation.h",
|
||||
"collective.h",
|
||||
"common_shape_fns.h",
|
||||
"control_flow.h",
|
||||
"dataset.h",
|
||||
"dataset_stateful_op_whitelist.h",
|
||||
@ -64,7 +63,6 @@ exports_files(
|
||||
"run_handler_util.h",
|
||||
"selective_registration.h",
|
||||
"session_state.h",
|
||||
"shape_inference.h",
|
||||
"shared_ptr_variant.h",
|
||||
"stats_aggregator.h",
|
||||
"tensor_reference.h",
|
||||
@ -210,7 +208,6 @@ filegroup(
|
||||
srcs = [
|
||||
"cancellation.cc",
|
||||
"collective.cc",
|
||||
"common_shape_fns.cc",
|
||||
"dataset.cc",
|
||||
"device_base.cc",
|
||||
"function.cc",
|
||||
@ -234,7 +231,6 @@ filegroup(
|
||||
"resource_mgr.cc",
|
||||
"run_handler.cc",
|
||||
"run_handler_util.cc",
|
||||
"shape_inference.cc",
|
||||
"tensor_slice.cc",
|
||||
"tensor_util.cc",
|
||||
"unique_tensor_references.cc",
|
||||
@ -688,7 +684,10 @@ tf_cuda_library(
|
||||
"variant_op_registry.h",
|
||||
"variant_tensor_data.h",
|
||||
],
|
||||
visibility = ["//tensorflow/core:__pkg__"],
|
||||
visibility = [
|
||||
"//tensorflow/core:__pkg__",
|
||||
"//tensorflow/core/util:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
":allocation_description_proto_cc",
|
||||
":allocator",
|
||||
@ -731,6 +730,47 @@ tf_cuda_library(
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "shape_inference",
|
||||
srcs = ["shape_inference.cc"],
|
||||
hdrs = ["shape_inference.h"],
|
||||
deps = [
|
||||
":bounds_check",
|
||||
":node_def_proto_cc",
|
||||
":node_def_util",
|
||||
":tensor",
|
||||
":tensor_shape",
|
||||
":tensor_shape_proto_cc",
|
||||
"//tensorflow/core/lib/core:errors",
|
||||
"//tensorflow/core/lib/core:status",
|
||||
"//tensorflow/core/lib/gtl:inlined_vector",
|
||||
"//tensorflow/core/lib/strings:numbers",
|
||||
"//tensorflow/core/lib/strings:scanner",
|
||||
"//tensorflow/core/lib/strings:str_util",
|
||||
"//tensorflow/core/platform:macros",
|
||||
"@com_google_absl//absl/memory",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "common_shape_fns",
|
||||
srcs = ["common_shape_fns.cc"],
|
||||
hdrs = ["common_shape_fns.h"],
|
||||
deps = [
|
||||
":attr_value_proto_cc",
|
||||
":shape_inference",
|
||||
":tensor",
|
||||
":tensor_shape",
|
||||
"//tensorflow/core/lib/core:errors",
|
||||
"//tensorflow/core/lib/gtl:inlined_vector",
|
||||
"//tensorflow/core/util:einsum_op_util",
|
||||
"//tensorflow/core/util:padding",
|
||||
"//tensorflow/core/util:tensor_format",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "attr_value_util",
|
||||
srcs = ["attr_value_util.cc"],
|
||||
|
@ -35,7 +35,6 @@ exports_files(
|
||||
"debug_events_writer.h",
|
||||
"device_name_utils.h",
|
||||
"dump_graph.h",
|
||||
"einsum_op_util.h",
|
||||
"env_var.h",
|
||||
"equal_graph_def.h",
|
||||
"events_writer.h",
|
||||
@ -50,7 +49,6 @@ exports_files(
|
||||
"memmapped_file_system_writer.h",
|
||||
"mirror_pad_mode.h",
|
||||
"mkl_util.h",
|
||||
"padding.h",
|
||||
"permutation_input_iterator.h",
|
||||
"permutation_output_iterator.h",
|
||||
"port.h",
|
||||
@ -60,7 +58,6 @@ exports_files(
|
||||
"stat_summarizer_options.h",
|
||||
"stats_calculator.h",
|
||||
"strided_slice_op.h",
|
||||
"tensor_format.h",
|
||||
"tensor_slice_reader.h",
|
||||
"tensor_slice_reader_cache.h",
|
||||
"tensor_slice_set.h",
|
||||
@ -150,12 +147,15 @@ filegroup(
|
||||
],
|
||||
exclude = [
|
||||
"*test*",
|
||||
"einsum_op_util.cc",
|
||||
"env_var.cc",
|
||||
"memmapped_file_system.*",
|
||||
"memmapped_file_system_writer.*",
|
||||
"padding.cc",
|
||||
"port.cc",
|
||||
"reporter.cc",
|
||||
"stats_calculator.cc",
|
||||
"tensor_format.cc",
|
||||
"version_info.cc",
|
||||
],
|
||||
),
|
||||
@ -389,6 +389,42 @@ cc_library(
|
||||
copts = tf_copts(),
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "tensor_format",
|
||||
srcs = ["tensor_format.cc"],
|
||||
hdrs = ["tensor_format.h"],
|
||||
deps = [
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core/framework:tensor",
|
||||
"//tensorflow/core/platform:types",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "padding",
|
||||
srcs = ["padding.cc"],
|
||||
hdrs = ["padding.h"],
|
||||
deps = [
|
||||
":tensor_format",
|
||||
"//tensorflow/core/framework:attr_value_proto_cc",
|
||||
"//tensorflow/core/framework:node_def_util",
|
||||
"//tensorflow/core/lib/core:errors",
|
||||
"//tensorflow/core/lib/core:status",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "einsum_op_util",
|
||||
srcs = ["einsum_op_util.cc"],
|
||||
hdrs = ["einsum_op_util.h"],
|
||||
deps = [
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core/lib/core:errors",
|
||||
"//tensorflow/core/lib/core:status",
|
||||
"@com_google_absl//absl/strings",
|
||||
],
|
||||
)
|
||||
|
||||
# Tests.
|
||||
|
||||
tf_cc_test(
|
||||
|
Loading…
Reference in New Issue
Block a user