# Description: # XLA service implementation. licenses(["notice"]) # Apache 2.0 package(default_visibility = [":friends"]) package_group( name = "friends", includes = [ "//tensorflow/compiler/xla:friends", ], ) load("//tensorflow/compiler/xla/tests:build_defs.bzl", "xla_test") load("//tensorflow/compiler/xla:xla.bzl", "xla_proto_library") load("//tensorflow:tensorflow.bzl", "tf_cc_test") load("//tensorflow:tensorflow.bzl", "tf_cc_binary") load( "//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library_py", ) xla_proto_library( name = "hlo_proto", srcs = ["hlo.proto"], visibility = ["//visibility:public"], deps = ["//tensorflow/compiler/xla:xla_data_proto"], ) tf_proto_library_py( name = "hlo_proto", # bzl adds a _py suffix only to the OSS target. srcs = ["hlo.proto"], visibility = ["//visibility:public"], deps = ["//tensorflow/compiler/xla:xla_data_proto_py"], ) xla_proto_library( name = "hlo_profile_printer_data", srcs = ["hlo_profile_printer_data.proto"], ) # Filegroup used to collect source files for dependency checking. filegroup( name = "c_srcs", data = glob([ "**/*.cc", "**/*.h", ]), ) cc_library( name = "bfloat16_support", srcs = ["bfloat16_support.cc"], hdrs = ["bfloat16_support.h"], deps = [ ":hlo", ], ) cc_library( name = "bfloat16_conversion_folding", srcs = ["bfloat16_conversion_folding.cc"], hdrs = ["bfloat16_conversion_folding.h"], deps = [ ":bfloat16_support", ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "bfloat16_conversion_folding_test", srcs = ["bfloat16_conversion_folding_test.cc"], deps = [ ":bfloat16_conversion_folding", ":bfloat16_support", ":hlo", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", ], ) cc_library( name = "bfloat16_normalization", srcs = ["bfloat16_normalization.cc"], hdrs = ["bfloat16_normalization.h"], deps = [ ":bfloat16_support", ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "bfloat16_normalization_test", srcs = ["bfloat16_normalization_test.cc"], deps = [ ":bfloat16_normalization", ":bfloat16_support", ":hlo", ":hlo_verifier", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", ], ) cc_library( name = "bfloat16_propagation", srcs = ["bfloat16_propagation.cc"], hdrs = ["bfloat16_propagation.h"], deps = [ ":bfloat16_support", ":hlo", ":hlo_dataflow_analysis", ":hlo_dce", ":hlo_pass", ":tuple_simplifier", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_tree", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", ], ) tf_cc_test( name = "bfloat16_propagation_test", srcs = ["bfloat16_propagation_test.cc"], deps = [ ":bfloat16_propagation", ":bfloat16_support", ":hlo", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:literal_test_util", "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep ], ) cc_library( name = "shape_inference", srcs = ["shape_inference.cc"], hdrs = ["shape_inference.h"], deps = [ ":hlo", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:window_util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "shape_inference_test", srcs = ["shape_inference_test.cc"], deps = [ ":hlo", ":shape_inference", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep "//tensorflow/core:lib", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "hlo_opcode_test", srcs = ["hlo_opcode_test.cc"], deps = [ ":hlo", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) cc_library( name = "hlo_evaluator", srcs = [ "hlo_evaluator.cc", "hlo_evaluator_typed_visitor.h", "hlo_evaluator_typed_visitor_bfloat16.cc", "hlo_evaluator_typed_visitor_bool.cc", "hlo_evaluator_typed_visitor_complex64.cc", "hlo_evaluator_typed_visitor_double.cc", "hlo_evaluator_typed_visitor_float.cc", "hlo_evaluator_typed_visitor_half.cc", "hlo_evaluator_typed_visitor_int32.cc", "hlo_evaluator_typed_visitor_int64.cc", "hlo_evaluator_typed_visitor_int8.cc", "hlo_evaluator_typed_visitor_uint32.cc", "hlo_evaluator_typed_visitor_uint64.cc", "hlo_evaluator_typed_visitor_uint8.cc", ], hdrs = ["hlo_evaluator.h"], deps = [ ":hlo", ":hlo_casting_utils", ":hlo_query", ":shape_inference", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:window_util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/container:node_hash_map", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "hlo_evaluator_test", srcs = ["hlo_evaluator_test.cc"], deps = [ ":hlo", ":hlo_evaluator", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:reference_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/client:xla_builder", "//tensorflow/compiler/xla/service:hlo_element_type_converter", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:literal_test_util", "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep "//tensorflow/core:lib", "//tensorflow/core:test", "@com_google_absl//absl/memory", ], ) cc_library( name = "hlo", srcs = [ "dfs_hlo_visitor.cc", "hlo_computation.cc", "hlo_instruction.cc", "hlo_instructions.cc", "hlo_module.cc", "hlo_opcode.cc", "hlo_schedule.cc", "hlo_sharding.cc", "hlo_sharding_metadata.cc", ], hdrs = [ "dfs_hlo_visitor.h", "dfs_hlo_visitor_with_default.h", "hlo_clone_context.h", "hlo_computation.h", "hlo_domain_metadata.h", "hlo_instruction.h", "hlo_instructions.h", "hlo_module.h", "hlo_opcode.h", "hlo_schedule.h", "hlo_sharding.h", "hlo_sharding_metadata.h", ], deps = [ ":hlo_casting_utils", ":hlo_module_config", ":hlo_proto", ":hlo_reachability", ":name_uniquer", "//tensorflow/compiler/xla:array", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:protobuf_util", "//tensorflow/compiler/xla:shape_tree", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:window_util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:human_readable_json", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:optional", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "dfs_hlo_visitor_with_default_test", srcs = ["dfs_hlo_visitor_with_default_test.cc"], deps = [ ":hlo", ":hlo_runner", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", ], ) cc_library( name = "pattern_matcher", hdrs = ["pattern_matcher.h"], deps = [ ":hlo", ":hlo_casting_utils", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "@com_google_absl//absl/strings", "@com_google_absl//absl/utility", ], ) tf_cc_test( name = "pattern_matcher_test", srcs = ["pattern_matcher_test.cc"], deps = [ ":hlo", ":pattern_matcher", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", ], ) cc_library( name = "hlo_reachability", srcs = ["hlo_reachability.cc"], hdrs = ["hlo_reachability.h"], deps = [ "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "hlo_reachability_test", srcs = ["hlo_reachability_test.cc"], deps = [ ":hlo", ":hlo_reachability", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) cc_library( name = "hlo_matchers", testonly = 1, srcs = ["hlo_matchers.cc"], hdrs = ["hlo_matchers.h"], deps = [ ":hlo", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", ], ) tf_cc_test( name = "hlo_matchers_test", srcs = ["hlo_matchers_test.cc"], deps = [ ":hlo_matchers", ":hlo_parser", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) tf_cc_test( name = "hlo_instruction_test", srcs = ["hlo_instruction_test.cc"], deps = [ ":hlo", ":hlo_parser", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:protobuf_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:window_util", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) tf_cc_test( name = "hlo_sharding_test", srcs = ["hlo_sharding_test.cc"], deps = [ ":hlo", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:protobuf_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) cc_library( name = "call_graph", srcs = ["call_graph.cc"], hdrs = ["call_graph.h"], deps = [ ":hlo", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", ], ) tf_cc_test( name = "call_graph_test", srcs = ["call_graph_test.cc"], deps = [ ":call_graph", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service:hlo", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", ], ) cc_library( name = "flatten_call_graph", srcs = ["flatten_call_graph.cc"], hdrs = ["flatten_call_graph.h"], deps = [ ":call_graph", ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", ], ) cc_library( name = "call_inliner", srcs = ["call_inliner.cc"], hdrs = ["call_inliner.h"], deps = [ ":call_graph", ":hlo_dce", ":hlo_pass", "//tensorflow/compiler/xla:statusor", "//tensorflow/core:lib", ], ) tf_cc_test( name = "call_inliner_test", size = "small", srcs = ["call_inliner_test.cc"], deps = [ ":call_inliner", ":hlo", ":hlo_matchers", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", "@com_google_absl//absl/memory", ], ) tf_cc_test( name = "flatten_call_graph_test", srcs = ["flatten_call_graph_test.cc"], deps = [ ":call_graph", ":flatten_call_graph", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service:hlo", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", ], ) cc_library( name = "platform_util", srcs = ["platform_util.cc"], hdrs = ["platform_util.h"], deps = [ ":compiler", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/strings", ], ) cc_library( name = "backend", srcs = ["backend.cc"], hdrs = ["backend.h"], deps = [ ":compiler", ":computation_placer", ":device_memory_allocator", ":platform_util", ":stream_pool", ":transfer_manager", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:core_cpu_lib", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "//third_party/eigen3", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) cc_library( name = "service", srcs = ["service.cc"], hdrs = ["service.h"], deps = [ ":allocation_tracker", ":backend", ":channel_tracker", ":compiler", ":computation_layout", ":device_memory_allocator", ":executable", ":execution_tracker", ":hlo", ":hlo_cost_analysis", ":hlo_evaluator", ":hlo_execution_profile", ":hlo_module_config", ":hlo_proto_util", ":platform_util", ":source_map_util", ":stream_pool", ":transfer_manager", "//tensorflow/compiler/xla:executable_run_options", "//tensorflow/compiler/xla:execution_options_util", "//tensorflow/compiler/xla:service_interface", "//tensorflow/compiler/xla:shape_layout", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla:xla_proto", "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", "//tensorflow/core:lib", "//tensorflow/core:ptr_util", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:span", ], alwayslink = 1, ) cc_library( name = "local_service", srcs = ["local_service.cc"], hdrs = ["local_service.h"], deps = [ ":backend", ":compiler", ":computation_layout", ":device_memory_allocator", ":executable", ":hlo", ":hlo_execution_profile", ":hlo_module_config", ":platform_util", ":service", ":shaped_buffer", "//tensorflow/compiler/xla:execution_options_util", "//tensorflow/compiler/xla:shape_layout", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/client:executable_build_options", "//tensorflow/compiler/xla/client:xla_computation", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:span", ], ) cc_library( name = "compile_only_service", srcs = ["compile_only_service.cc"], hdrs = ["compile_only_service.h"], deps = [ ":backend", ":compiler", ":computation_layout", ":platform_util", ":service", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/strings", ], ) cc_library( name = "cpu_plugin", deps = [ ":service", "//tensorflow/compiler/xla/service/cpu:cpu_compiler", "//tensorflow/compiler/xla/service/cpu:cpu_transfer_manager", "//tensorflow/core:stream_executor_no_cuda", ], ) cc_library( name = "gpu_plugin", deps = [ ":service", "//tensorflow/compiler/xla/service/gpu:gpu_compiler", "//tensorflow/compiler/xla/service/gpu:gpu_transfer_manager", "//tensorflow/core:stream_executor_no_cuda", "//tensorflow/core/platform/default/build_config:stream_executor_cuda", ], ) cc_library( name = "interpreter_plugin", deps = [ ":service", "//tensorflow/compiler/xla/service/interpreter:compiler", "//tensorflow/compiler/xla/service/interpreter:interpreter_transfer_manager", "//tensorflow/compiler/xla/service/interpreter:platform", "//tensorflow/core:stream_executor_no_cuda", ], ) cc_library( name = "shaped_buffer", srcs = ["shaped_buffer.cc"], hdrs = ["shaped_buffer.h"], deps = [ ":device_memory_allocator", "//tensorflow/compiler/xla:shape_tree", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "shaped_buffer_test", srcs = ["shaped_buffer_test.cc"], deps = [ ":cpu_plugin", ":device_memory_allocator", ":platform_util", ":shaped_buffer", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:ptr_util", "//tensorflow/core:test", "@com_google_absl//absl/memory", ], ) cc_library( name = "executable", srcs = ["executable.cc"], hdrs = [ "executable.h", "service_executable_run_options.h", ], deps = [ ":computation_layout", ":device_memory_allocator", ":hlo", ":hlo_execution_profile", ":hlo_graph_dumper", ":hlo_proto", ":maybe_owning_device_memory", ":shaped_buffer", ":stream_pool", "//tensorflow/compiler/xla:executable_run_options", "//tensorflow/compiler/xla:shape_tree", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "//tensorflow/core:stream_executor_no_cuda", "//tensorflow/stream_executor", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:span", "@com_google_absl//absl/types:variant", ], ) cc_library( name = "compiler", srcs = ["compiler.cc"], hdrs = ["compiler.h"], deps = [ ":buffer_value", ":executable", ":hlo", ":hlo_module_config", ":logical_buffer", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/types:span", ], ) cc_library( name = "llvm_compiler", srcs = ["llvm_compiler.cc"], hdrs = ["llvm_compiler.h"], deps = [ ":compiler", "//tensorflow/core:lib_internal", "@llvm//:core", ], ) cc_library( name = "transfer_manager", srcs = ["transfer_manager.cc"], hdrs = ["transfer_manager.h"], deps = [ ":shaped_buffer", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) cc_library( name = "allocation_tracker", srcs = ["allocation_tracker.cc"], hdrs = ["allocation_tracker.h"], deps = [ ":backend", ":device_memory_allocator", ":transfer_manager", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", ], ) cc_library( name = "execution_tracker", srcs = ["execution_tracker.cc"], hdrs = ["execution_tracker.h"], deps = [ ":backend", ":stream_pool", "//tensorflow/compiler/xla:executable_run_options", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/memory", ], ) cc_library( name = "channel_tracker", srcs = ["channel_tracker.cc"], hdrs = ["channel_tracker.h"], deps = [ ":hlo", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) cc_library( name = "name_uniquer", srcs = ["name_uniquer.cc"], hdrs = ["name_uniquer.h"], deps = [ "//tensorflow/compiler/xla:types", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "name_uniquer_test", srcs = ["name_uniquer_test.cc"], deps = [ ":name_uniquer", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", ], ) cc_library( name = "buffer_liveness", srcs = [ "buffer_liveness.cc", ], hdrs = [ "buffer_liveness.h", ], deps = [ ":hlo", ":hlo_ordering", ":logical_buffer", ":tuple_points_to_analysis", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", ], ) tf_cc_test( name = "buffer_liveness_test", srcs = ["buffer_liveness_test.cc"], deps = [ ":buffer_liveness", ":hlo", ":hlo_dataflow_analysis", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", "@com_google_absl//absl/memory", ], ) cc_library( name = "buffer_assignment", srcs = [ "buffer_assignment.cc", ], hdrs = [ "buffer_assignment.h", ], deps = [ ":buffer_liveness", ":buffer_value_containers", ":heap_simulator", ":hlo", ":hlo_memory_scheduler", ":hlo_proto", ":logical_buffer", ":tuple_points_to_analysis", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "buffer_assignment_test", srcs = ["buffer_assignment_test.cc"], deps = [ ":buffer_assignment", ":buffer_value", ":call_graph", ":copy_insertion", ":cpu_plugin", ":flatten_call_graph", ":hlo", ":hlo_memory_scheduler", ":hlo_ordering", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", "@com_google_absl//absl/memory", ], ) cc_library( name = "hlo_ordering", srcs = ["hlo_ordering.cc"], hdrs = ["hlo_ordering.h"], deps = [ ":call_graph", ":hlo", ":hlo_dataflow_analysis", ":hlo_proto", ":hlo_value", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", ], ) tf_cc_test( name = "hlo_ordering_test", size = "small", srcs = ["hlo_ordering_test.cc"], deps = [ ":hlo", ":hlo_dataflow_analysis", ":hlo_memory_scheduler", ":hlo_ordering", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", ], ) cc_library( name = "heap_simulator", srcs = ["heap_simulator.cc"], hdrs = ["heap_simulator.h"], deps = [ ":buffer_value", ":buffer_value_containers", ":hlo", ":hlo_ordering", ":hlo_proto", ":tuple_points_to_analysis", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", ], ) tf_cc_test( name = "heap_simulator_test", srcs = ["heap_simulator_test.cc"], deps = [ ":buffer_value", ":heap_simulator", ":hlo", ":hlo_ordering", ":hlo_value", ":tuple_points_to_analysis", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/memory", ], ) cc_library( name = "hlo_module_group", srcs = ["hlo_module_group.cc"], hdrs = ["hlo_module_group.h"], deps = [ ":hlo", ":hlo_proto", "//tensorflow/compiler/xla:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "hlo_module_group_test", srcs = ["hlo_module_group_test.cc"], deps = [ ":hlo", ":hlo_matchers", ":hlo_module_group", ":hlo_module_group_metadata", ":hlo_parser", ":hlo_proto", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", ], ) cc_library( name = "hlo_module_group_metadata", srcs = ["hlo_module_group_metadata.cc"], hdrs = ["hlo_module_group_metadata.h"], deps = [ ":hlo", ":hlo_casting_utils", ":tuple_points_to_analysis", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/memory", "@com_google_absl//absl/types:optional", ], ) cc_library( name = "hlo_module_group_util", srcs = ["hlo_module_group_util.cc"], hdrs = ["hlo_module_group_util.h"], deps = [ ":hlo", ":hlo_casting_utils", ":hlo_module_group_metadata", ":hlo_reachability", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "hlo_schedule_test", srcs = ["hlo_schedule_test.cc"], deps = [ ":heap_simulator", ":hlo", ":hlo_dce", ":hlo_memory_scheduler", ":hlo_ordering", ":hlo_parser", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", "@com_google_absl//absl/algorithm:container", ], ) cc_library( name = "hlo_memory_scheduler", srcs = ["hlo_memory_scheduler.cc"], hdrs = ["hlo_memory_scheduler.h"], deps = [ ":heap_simulator", ":hlo", ":hlo_ordering", ":hlo_pass", ":logical_buffer", ":tuple_points_to_analysis", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", ], ) tf_cc_test( name = "hlo_memory_scheduler_test", srcs = ["hlo_memory_scheduler_test.cc"], deps = [ ":heap_simulator", ":hlo", ":hlo_dce", ":hlo_memory_scheduler", ":hlo_ordering", ":hlo_parser", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:flat_hash_map", ], ) cc_library( name = "hlo_query", srcs = ["hlo_query.cc"], hdrs = ["hlo_query.h"], deps = [ ":hlo", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", ], ) cc_library( name = "fusion_queue", hdrs = ["fusion_queue.h"], deps = [ ":hlo", ], ) cc_library( name = "instruction_fusion", srcs = ["instruction_fusion.cc"], hdrs = ["instruction_fusion.h"], deps = [ ":fusion_queue", ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/memory", ], ) tf_cc_test( name = "instruction_fusion_test", srcs = ["instruction_fusion_test.cc"], deps = [ ":hlo_matchers", ":instruction_fusion", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) cc_library( name = "multi_output_fusion", srcs = ["multi_output_fusion.cc"], hdrs = ["multi_output_fusion.h"], deps = [ "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla/service:hlo", "//tensorflow/compiler/xla/service:hlo_pass", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", ], ) cc_library( name = "hlo_creation_utils", srcs = ["hlo_creation_utils.cc"], hdrs = ["hlo_creation_utils.h"], deps = [ ":hlo", ":shape_inference", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "hlo_creation_utils_test", srcs = ["hlo_creation_utils_test.cc"], deps = [ ":hlo", ":hlo_creation_utils", ":hlo_evaluator", ":hlo_matchers", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", "@com_google_absl//absl/memory", ], ) cc_library( name = "batchnorm_expander", srcs = ["batchnorm_expander.cc"], hdrs = ["batchnorm_expander.h"], deps = [ ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/types:optional", "@com_google_absl//absl/types:span", ], ) cc_library( name = "gather_expander", srcs = ["gather_expander.cc"], hdrs = ["gather_expander.h"], deps = [ ":hlo", ":hlo_creation_utils", ":hlo_pass", ":while_util", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "@com_google_absl//absl/algorithm:container", ], ) cc_library( name = "scatter_expander", srcs = ["scatter_expander.cc"], hdrs = ["scatter_expander.h"], deps = [ ":hlo", ":hlo_creation_utils", ":hlo_pass", ":while_util", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:statusor", "@com_google_absl//absl/algorithm:container", ], ) tf_cc_test( name = "batchnorm_expander_test", size = "small", srcs = ["batchnorm_expander_test.cc"], deps = [ ":batchnorm_expander", ":hlo", ":hlo_matchers", ":hlo_parser", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "@com_google_absl//absl/memory", ], ) cc_library( name = "algebraic_simplifier", srcs = ["algebraic_simplifier.cc"], hdrs = ["algebraic_simplifier.h"], deps = [ ":hlo", ":hlo_casting_utils", ":hlo_creation_utils", ":hlo_pass", ":hlo_query", ":pattern_matcher", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:window_util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "algebraic_simplifier_test", srcs = ["algebraic_simplifier_test.cc"], deps = [ ":algebraic_simplifier", ":hlo", ":hlo_casting_utils", ":hlo_matchers", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:window_util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep "//tensorflow/core:lib", "//tensorflow/core:test", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", ], ) cc_library( name = "batch_dot_simplification", srcs = ["batch_dot_simplification.cc"], hdrs = ["batch_dot_simplification.h"], deps = [ ":hlo", ":hlo_creation_utils", ":hlo_pass", "@com_google_absl//absl/algorithm:container", ], ) tf_cc_test( name = "batch_dot_simplification_test", srcs = ["batch_dot_simplification_test.cc"], deps = [ ":batch_dot_simplification", ":hlo", ":hlo_matchers", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:window_util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep "//tensorflow/core:lib", "//tensorflow/core:test", ], ) tf_cc_test( name = "gather_expander_test", srcs = ["gather_expander_test.cc"], deps = [ ":gather_expander", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:test_macros_header", "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep ], ) cc_library( name = "conditional_simplifier", srcs = ["conditional_simplifier.cc"], hdrs = ["conditional_simplifier.h"], deps = [ ":call_inliner", ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "conditional_simplifier_test", srcs = ["conditional_simplifier_test.cc"], deps = [ ":conditional_simplifier", ":hlo", ":hlo_matchers", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/core:lib", "//tensorflow/core:test", ], ) cc_library( name = "convolution_feature_group_converter", srcs = ["convolution_feature_group_converter.cc"], hdrs = ["convolution_feature_group_converter.h"], deps = [ ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "convolution_feature_group_converter_test", size = "small", srcs = ["convolution_feature_group_converter_test.cc"], deps = [ ":convolution_feature_group_converter", ":hlo", ":hlo_matchers", ":hlo_parser", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla/tests:hlo_test_base", ], ) cc_library( name = "while_loop_analysis", srcs = ["while_loop_analysis.cc"], hdrs = ["while_loop_analysis.h"], deps = [ ":hlo", ":hlo_evaluator", "@com_google_absl//absl/types:optional", ], ) cc_library( name = "while_loop_simplifier", srcs = ["while_loop_simplifier.cc"], hdrs = ["while_loop_simplifier.h"], deps = [ ":call_inliner", ":hlo", ":hlo_pass", ":while_loop_analysis", "//tensorflow/compiler/xla:statusor", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", ], ) tf_cc_test( name = "while_loop_simplifier_test", srcs = ["while_loop_simplifier_test.cc"], deps = [ ":hlo_matchers", ":while_loop_simplifier", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/core:lib", "//tensorflow/core:test", "@com_google_absl//absl/strings", ], ) cc_library( name = "defuser", srcs = ["defuser.cc"], hdrs = ["defuser.h"], deps = [ ":call_graph", ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", ], ) tf_cc_test( name = "defuser_test", srcs = ["defuser_test.cc"], deps = [ ":defuser", ":hlo_matchers", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", ], ) cc_library( name = "implicit_broadcast_remover", srcs = ["implicit_broadcast_remover.cc"], hdrs = ["implicit_broadcast_remover.h"], deps = [ ":hlo", ":hlo_dce", ":hlo_pass", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", ], ) tf_cc_test( name = "implicit_broadcast_remover_test", srcs = ["implicit_broadcast_remover_test.cc"], deps = [ ":hlo_matchers", ":implicit_broadcast_remover", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", ], ) cc_library( name = "dot_decomposer", srcs = ["dot_decomposer.cc"], hdrs = ["dot_decomposer.h"], deps = [ ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", ], ) cc_library( name = "tuple_simplifier", srcs = ["tuple_simplifier.cc"], hdrs = ["tuple_simplifier.h"], deps = [ ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", ], ) tf_cc_test( name = "tuple_simplifier_test", srcs = ["tuple_simplifier_test.cc"], deps = [ ":hlo", ":hlo_matchers", ":tuple_simplifier", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/core:test", ], ) cc_library( name = "reshape_mover", srcs = ["reshape_mover.cc"], hdrs = ["reshape_mover.h"], deps = [ ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/algorithm:container", ], ) tf_cc_test( name = "reshape_mover_test", srcs = ["reshape_mover_test.cc"], deps = [ ":hlo", ":hlo_matchers", ":reshape_mover", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "@com_google_absl//absl/memory", ], ) cc_library( name = "computation_placer", srcs = ["computation_placer.cc"], hdrs = ["computation_placer.h"], deps = [ "//tensorflow/compiler/xla:array2d", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", ], alwayslink = True, # Contains per-platform computation placer registration ) cc_library( name = "human_readable_profile_builder", srcs = ["human_readable_profile_builder.cc"], hdrs = ["human_readable_profile_builder.h"], deps = [ "//tensorflow/compiler/xla:metric_table_report", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", ], ) cc_library( name = "generic_transfer_manager", srcs = ["generic_transfer_manager.cc"], hdrs = ["generic_transfer_manager.h"], deps = [ ":transfer_manager", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service/interpreter:platform_id", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", ], alwayslink = True, # Contains per-platform transfer manager registration ) cc_library( name = "hlo_cost_analysis", srcs = ["hlo_cost_analysis.cc"], hdrs = ["hlo_cost_analysis.h"], deps = [ ":hlo", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:window_util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "hlo_cost_analysis_test", srcs = ["hlo_cost_analysis_test.cc"], deps = [ ":cpu_plugin", ":hlo", ":hlo_cost_analysis", ":local_service", ":service", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla/client", "//tensorflow/compiler/xla/client:client_library", "//tensorflow/compiler/xla/client:local_client", "//tensorflow/compiler/xla/client:padding", "//tensorflow/compiler/xla/client:xla_builder", "//tensorflow/compiler/xla/client:xla_computation", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", ], ) cc_library( name = "hlo_execution_profile", srcs = ["hlo_execution_profile.cc"], hdrs = ["hlo_execution_profile.h"], deps = [ ":hlo", ":hlo_cost_analysis", ":hlo_profile_printer", ":human_readable_profile_builder", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/memory", ], ) tf_cc_test( name = "hlo_execution_profile_test", srcs = ["hlo_execution_profile_test.cc"], deps = [ ":cpu_plugin", ":hlo_cost_analysis", ":hlo_execution_profile", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "hlo_computation_test", srcs = ["hlo_computation_test.cc"], deps = [ ":hlo", ":hlo_matchers", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) tf_cc_binary( name = "graphviz_example", srcs = ["graphviz_example.cc"], deps = [ ":hlo", ":hlo_graph_dumper", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "hlo_module_test", srcs = ["hlo_module_test.cc"], deps = [ ":hlo", ":hlo_matchers", ":hlo_memory_scheduler", ":hlo_parser", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", "@com_google_absl//absl/memory", "@com_google_absl//absl/types:span", ], ) cc_library( name = "buffer_value", srcs = ["buffer_value.cc"], hdrs = ["buffer_value.h"], deps = [ ":hlo", ":hlo_proto", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) cc_library( name = "buffer_value_containers", hdrs = ["buffer_value_containers.h"], deps = [ ":buffer_value", ":logical_buffer", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/container:flat_hash_set", ], ) cc_library( name = "logical_buffer", srcs = ["logical_buffer.cc"], hdrs = ["logical_buffer.h"], deps = [ ":buffer_value", ":hlo", ":hlo_proto", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) cc_library( name = "hlo_value", srcs = ["hlo_value.cc"], hdrs = ["hlo_value.h"], deps = [ ":buffer_value", ":hlo", "//tensorflow/compiler/xla:shape_tree", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) cc_library( name = "hlo_dataflow_analysis", srcs = ["hlo_dataflow_analysis.cc"], hdrs = ["hlo_dataflow_analysis.h"], deps = [ ":call_graph", ":hlo", ":hlo_value", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "hlo_dataflow_analysis_test", srcs = ["hlo_dataflow_analysis_test.cc"], deps = [ ":hlo", ":hlo_dataflow_analysis", ":hlo_graph_dumper", ":hlo_matchers", ":hlo_ordering", ":instruction_fusion", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", ], ) cc_library( name = "hlo_liveness_analysis", srcs = ["hlo_liveness_analysis.cc"], hdrs = ["hlo_liveness_analysis.h"], deps = [ ":call_graph", ":hlo", ":hlo_value", "//tensorflow/compiler/xla:shape_tree", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "hlo_liveness_analysis_test", srcs = ["hlo_liveness_analysis_test.cc"], deps = [ ":hlo", ":hlo_liveness_analysis", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", ], ) cc_library( name = "hlo_buffer", srcs = ["hlo_buffer.cc"], hdrs = ["hlo_buffer.h"], deps = [ ":hlo", ":hlo_value", "//tensorflow/compiler/xla:shape_tree", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", ], ) cc_library( name = "hlo_alias_analysis", srcs = ["hlo_alias_analysis.cc"], hdrs = ["hlo_alias_analysis.h"], deps = [ ":hlo", ":hlo_buffer", ":hlo_dataflow_analysis", ":hlo_ordering", ":hlo_value", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "hlo_alias_analysis_test", srcs = ["hlo_alias_analysis_test.cc"], deps = [ ":flatten_call_graph", ":hlo", ":hlo_alias_analysis", ":hlo_graph_dumper", ":hlo_matchers", ":hlo_ordering", ":instruction_fusion", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", ], ) cc_library( name = "logical_buffer_analysis", srcs = ["logical_buffer_analysis.cc"], hdrs = ["logical_buffer_analysis.h"], deps = [ ":hlo", ":logical_buffer", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/memory", ], ) cc_library( name = "tuple_points_to_analysis", srcs = ["tuple_points_to_analysis.cc"], hdrs = ["tuple_points_to_analysis.h"], deps = [ ":hlo", ":hlo_dataflow_analysis", ":logical_buffer", ":logical_buffer_analysis", "//tensorflow/compiler/xla:shape_tree", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "tuple_points_to_analysis_test", srcs = ["tuple_points_to_analysis_test.cc"], deps = [ ":hlo", ":hlo_matchers", ":instruction_fusion", ":tuple_points_to_analysis", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", ], ) cc_library( name = "layout_assignment", srcs = [ "layout_assignment.cc", ], hdrs = [ "layout_assignment.h", ], deps = [ ":computation_layout", ":hlo", ":hlo_casting_utils", ":hlo_dce", ":hlo_graph_dumper", ":hlo_pass", ":logical_buffer", ":tuple_points_to_analysis", ":tuple_simplifier", "//tensorflow/compiler/xla:shape_layout", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:span", ], ) cc_library( name = "copy_insertion", srcs = ["copy_insertion.cc"], hdrs = ["copy_insertion.h"], deps = [ ":buffer_liveness", ":hlo", ":hlo_alias_analysis", ":hlo_dce", ":hlo_graph_dumper", ":hlo_ordering", ":hlo_pass", ":logical_buffer", ":tuple_simplifier", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "copy_insertion_test", srcs = ["copy_insertion_test.cc"], deps = [ ":copy_insertion", ":hlo", ":hlo_graph_dumper", ":hlo_matchers", ":hlo_runner", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/core:test", ], ) cc_library( name = "hlo_dce", srcs = ["hlo_dce.cc"], hdrs = ["hlo_dce.h"], deps = [ ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", ], ) cc_library( name = "hlo_module_dce", srcs = ["hlo_module_dce.cc"], hdrs = ["hlo_module_dce.h"], deps = [ ":hlo", ":hlo_dce", ":hlo_liveness_analysis", ":hlo_pass", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", ], ) cc_library( name = "hlo_verifier", srcs = ["hlo_verifier.cc"], hdrs = ["hlo_verifier.h"], deps = [ ":hlo", ":hlo_casting_utils", ":hlo_pass", ":shape_inference", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "hlo_verifier_test", srcs = ["hlo_verifier_test.cc"], deps = [ ":hlo", ":hlo_parser", ":hlo_verifier", ":layout_assignment", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", ], ) cc_library( name = "hlo_rematerialization", srcs = ["hlo_rematerialization.cc"], hdrs = ["hlo_rematerialization.h"], deps = [ ":buffer_liveness", ":buffer_value", ":call_graph", ":flatten_call_graph", ":hlo", ":hlo_dce", ":hlo_memory_scheduler", ":hlo_ordering", ":logical_buffer", ":tuple_points_to_analysis", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", ], ) tf_cc_test( name = "hlo_rematerialization_test", srcs = ["hlo_rematerialization_test.cc"], deps = [ ":flatten_call_graph", ":hlo", ":hlo_matchers", ":hlo_ordering", ":hlo_rematerialization", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", ], ) tf_cc_test( name = "hlo_dce_test", srcs = ["hlo_dce_test.cc"], deps = [ ":hlo", ":hlo_dce", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:literal_test_util", "//tensorflow/compiler/xla/tests:test_utils", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", "@com_google_absl//absl/memory", ], ) tf_cc_test( name = "hlo_module_dce_test", srcs = ["hlo_module_dce_test.cc"], deps = [ ":hlo", ":hlo_module_dce", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:literal_test_util", "//tensorflow/compiler/xla/tests:test_utils", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", ], ) tf_cc_test( name = "layout_assignment_test", srcs = ["layout_assignment_test.cc"], deps = [ ":algebraic_simplifier", ":computation_layout", ":hlo", ":hlo_matchers", ":layout_assignment", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_layout", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:test_utils", "//tensorflow/core:lib", "//tensorflow/core:test", "@com_google_absl//absl/types:span", ], ) cc_library( name = "hlo_pass", hdrs = [ "hlo_pass_fix.h", "hlo_pass_interface.h", ], deps = [ ":hlo", ":hlo_module_group", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/core:lib", ], ) cc_library( name = "hlo_pass_pipeline", srcs = [ "hlo_pass_pipeline.cc", ], hdrs = [ "hlo_pass_pipeline.h", ], deps = [ ":hlo", ":hlo_graph_dumper", ":hlo_pass", ":hlo_proto_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", ], ) tf_cc_test( name = "hlo_pass_pipeline_test", srcs = ["hlo_pass_pipeline_test.cc"], deps = [ ":hlo", ":hlo_parser", ":hlo_pass_pipeline", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:test_utils", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", "//tensorflow/core:test", ], ) cc_library( name = "hlo_cse", srcs = ["hlo_cse.cc"], hdrs = ["hlo_cse.h"], deps = [ ":hlo", ":hlo_domain_map", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:inlined_vector", ], ) tf_cc_test( name = "hlo_cse_test", srcs = ["hlo_cse_test.cc"], deps = [ ":cpu_plugin", ":hlo", ":hlo_cse", ":hlo_matchers", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:literal_test_util", "//tensorflow/compiler/xla/tests:test_utils", "//tensorflow/core:lib", "@com_google_absl//absl/memory", ], ) cc_library( name = "hlo_constant_folding", srcs = ["hlo_constant_folding.cc"], hdrs = ["hlo_constant_folding.h"], deps = [ ":hlo", ":hlo_evaluator", ":hlo_pass", ":hlo_query", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/core:lib", "@com_google_absl//absl/memory", ], ) tf_cc_test( name = "hlo_constant_folding_test", srcs = ["hlo_constant_folding_test.cc"], deps = [ ":hlo", ":hlo_constant_folding", ":hlo_matchers", ":hlo_parser", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:literal_test_util", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) cc_library( name = "hlo_domain_map", srcs = ["hlo_domain_map.cc"], hdrs = ["hlo_domain_map.h"], deps = [ ":hlo", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", ], ) cc_library( name = "hlo_domain_verifier", srcs = ["hlo_domain_verifier.cc"], hdrs = ["hlo_domain_verifier.h"], deps = [ ":hlo", ":hlo_domain_map", ":hlo_graph_dumper", ":hlo_pass", "//tensorflow/compiler/xla:types", "//tensorflow/core:lib", ], ) cc_library( name = "hlo_domain_isolator", srcs = ["hlo_domain_isolator.cc"], hdrs = ["hlo_domain_isolator.h"], deps = [ ":hlo", ":hlo_graph_dumper", ":hlo_pass", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", ], ) cc_library( name = "hlo_domain_remover", srcs = ["hlo_domain_remover.cc"], hdrs = ["hlo_domain_remover.h"], deps = [ ":hlo", ":hlo_domain_map", ":hlo_domain_verifier", ":hlo_graph_dumper", ":hlo_pass", "//tensorflow/compiler/xla:types", "//tensorflow/core:lib", ], ) tf_cc_test( name = "hlo_domain_test", srcs = ["hlo_domain_test.cc"], deps = [ ":hlo", ":hlo_domain_isolator", ":hlo_domain_remover", ":hlo_parser", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla/legacy_flags:debug_options_flags", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:test", "@com_google_absl//absl/memory", ], ) cc_library( name = "hlo_element_type_converter", srcs = ["hlo_element_type_converter.cc"], hdrs = ["hlo_element_type_converter.h"], deps = [ ":hlo", ":hlo_evaluator", ":hlo_pass", ":hlo_query", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/core:lib", ], ) tf_cc_test( name = "hlo_element_type_converter_test", srcs = ["hlo_element_type_converter_test.cc"], deps = [ ":hlo_element_type_converter", ":hlo_matchers", "//tensorflow/compiler/xla/tests:hlo_test_base", ], ) cc_library( name = "device_memory_allocator", srcs = [ "device_memory_allocator.cc", "owning_device_memory.cc", ], hdrs = [ "device_memory_allocator.h", "owning_device_memory.h", ], deps = [ "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/types:span", ], ) cc_library( name = "maybe_owning_device_memory", srcs = [ "maybe_owning_device_memory.cc", ], hdrs = [ "maybe_owning_device_memory.h", ], deps = [ ":device_memory_allocator", "@com_google_absl//absl/types:optional", "@com_google_absl//absl/types:variant", ], ) cc_library( name = "elemental_ir_emitter", srcs = ["elemental_ir_emitter.cc"], hdrs = ["elemental_ir_emitter.h"], deps = [ ":hlo", ":hlo_casting_utils", ":hlo_module_config", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service/llvm_ir:ir_array", "//tensorflow/compiler/xla/service/llvm_ir:ir_builder_mixin", "//tensorflow/compiler/xla/service/llvm_ir:llvm_loop", "//tensorflow/compiler/xla/service/llvm_ir:llvm_util", "//tensorflow/compiler/xla/service/llvm_ir:loop_emitter", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/strings", "@llvm//:core", "@llvm//:transform_utils", ], ) xla_test( name = "elemental_ir_emitter_test", srcs = ["elemental_ir_emitter_test.cc"], backends = [ "cpu", "gpu", ], deps = [ "//tensorflow/compiler/xla:execution_options_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:client_library_test_base", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) cc_library( name = "hlo_module_config", srcs = ["hlo_module_config.cc"], hdrs = ["hlo_module_config.h"], deps = [ ":computation_layout", "//tensorflow/compiler/xla:shape_layout", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla:xla_proto", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", ], ) cc_library( name = "computation_layout", srcs = ["computation_layout.cc"], hdrs = ["computation_layout.h"], deps = [ "//tensorflow/compiler/xla:shape_layout", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "@com_google_absl//absl/strings", ], ) cc_library( name = "hlo_subcomputation_unification", srcs = ["hlo_subcomputation_unification.cc"], hdrs = ["hlo_subcomputation_unification.h"], deps = [ ":hlo_pass", ], ) tf_cc_test( name = "hlo_subcomputation_unification_test", srcs = ["hlo_subcomputation_unification_test.cc"], deps = [ ":hlo", ":hlo_graph_dumper", ":hlo_subcomputation_unification", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:test_utils", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) cc_library( name = "hlo_tfgraph_builder", srcs = ["hlo_tfgraph_builder.cc"], hdrs = ["hlo_tfgraph_builder.h"], deps = [ ":hlo", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:xla_proto", "//tensorflow/core:framework", "//tensorflow/core:protos_all_cc", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "hlo_tfgraph_builder_test", srcs = ["hlo_tfgraph_builder_test.cc"], deps = [ ":hlo_tfgraph_builder", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:protos_all_cc", ], ) cc_library( name = "hlo_graph_dumper", srcs = [ "hlo_graph_dumper.cc", ], hdrs = ["hlo_graph_dumper.h"], deps = [ ":hlo", ":hlo_casting_utils", ":hlo_execution_profile", ":hlo_tfgraph_builder", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:window_util", "//tensorflow/compiler/xla:xla_proto", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", "//tensorflow/core:regexp_internal", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", "@com_google_absl//absl/types:optional", ], alwayslink = 1, ) tf_cc_test( name = "hlo_graph_dumper_test", srcs = ["hlo_graph_dumper_test.cc"], deps = [ ":hlo", ":hlo_graph_dumper", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:xla_proto", "//tensorflow/compiler/xla/tests:test_utils", "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep "//tensorflow/core:lib", "@com_google_absl//absl/strings", ], ) cc_library( name = "transpose_folding", srcs = ["transpose_folding.cc"], hdrs = ["transpose_folding.h"], deps = [ ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", ], ) tf_cc_test( name = "transpose_folding_test", srcs = ["transpose_folding_test.cc"], deps = [ ":hlo", ":hlo_matchers", ":shape_inference", ":transpose_folding", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/client:xla_builder", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/service/gpu:ir_emission_utils", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", ], ) cc_library( name = "zero_sized_hlo_elimination", srcs = ["zero_sized_hlo_elimination.cc"], hdrs = ["zero_sized_hlo_elimination.h"], deps = [ ":hlo", ":hlo_pass", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", ], ) tf_cc_test( name = "zero_sized_hlo_elimination_test", srcs = ["zero_sized_hlo_elimination_test.cc"], deps = [ ":hlo", ":shape_inference", ":zero_sized_hlo_elimination", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/client:xla_builder", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", ], ) cc_library( name = "stream_pool", srcs = ["stream_pool.cc"], hdrs = ["stream_pool.h"], deps = [ "//tensorflow/compiler/xla:types", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "@com_google_absl//absl/memory", ], ) tf_cc_test( name = "stream_pool_test", srcs = ["stream_pool_test.cc"], deps = [ ":stream_pool", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:stream_executor_no_cuda", ], ) cc_library( name = "hlo_proto_util", srcs = ["hlo_proto_util.cc"], hdrs = ["hlo_proto_util.h"], deps = [ ":buffer_assignment", ":hlo", ":hlo_proto", ":hlo_verifier", "//tensorflow/compiler/xla:status", "//tensorflow/compiler/xla:util", ], ) tf_cc_test( name = "hlo_proto_util_test", srcs = ["hlo_proto_util_test.cc"], deps = [ ":hlo", ":hlo_proto", ":hlo_proto_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "//tensorflow/core:lib", ], ) cc_library( name = "reduce_precision_insertion", srcs = ["reduce_precision_insertion.cc"], hdrs = ["reduce_precision_insertion.h"], deps = [ ":buffer_liveness", ":hlo", ":hlo_pass", ":hlo_pass_pipeline", "//tensorflow/compiler/xla:shape_util", "//tensorflow/core:lib", "@com_google_absl//absl/container:flat_hash_map", ], ) tf_cc_test( name = "reduce_precision_insertion_test", size = "small", srcs = ["reduce_precision_insertion_test.cc"], deps = [ ":hlo", ":hlo_matchers", ":reduce_precision_insertion", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:test_helpers", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_test_base", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) cc_library( name = "hlo_runner", srcs = ["hlo_runner.cc"], hdrs = ["hlo_runner.h"], deps = [ ":computation_placer", ":executable", ":hlo", ":transfer_manager", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/service:backend", "//tensorflow/compiler/xla/service:compiler", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/core:core_cpu_internal", "//tensorflow/core:lib", "//tensorflow/core:stream_executor_no_cuda", "//third_party/eigen3", "@com_google_absl//absl/memory", "@com_google_absl//absl/types:span", ], ) cc_library( name = "hlo_profile_printer", srcs = ["hlo_profile_printer.cc"], hdrs = ["hlo_profile_printer.h"], deps = [ ":hlo_profile_printer_data", ":human_readable_profile_builder", "//tensorflow/compiler/xla:types", ], ) cc_library( name = "tuple_util", srcs = ["tuple_util.cc"], hdrs = ["tuple_util.h"], deps = [ ":hlo", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "tuple_util_test", srcs = ["tuple_util_test.cc"], deps = [ ":tuple_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla/service:hlo_matchers", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:xla_internal_test_main", ], ) cc_library( name = "while_util", srcs = ["while_util.cc"], hdrs = ["while_util.h"], deps = [ ":call_inliner", ":hlo", ":hlo_creation_utils", ":tuple_util", "//tensorflow/compiler/xla:literal_util", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/strings", ], ) tf_cc_test( name = "while_util_test", srcs = ["while_util_test.cc"], deps = [ ":while_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla/service:hlo_matchers", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:xla_internal_test_main", "@com_google_absl//absl/algorithm:container", ], ) cc_library( name = "while_loop_invariant_code_motion", srcs = ["while_loop_invariant_code_motion.cc"], hdrs = ["while_loop_invariant_code_motion.h"], deps = [ ":hlo", ":hlo_pass", ":tuple_util", ":while_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:inlined_vector", ], ) tf_cc_test( name = "while_loop_invariant_code_motion_test", srcs = ["while_loop_invariant_code_motion_test.cc"], deps = [ ":hlo_matchers", ":while_loop_invariant_code_motion", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/core:test", ], ) cc_library( name = "while_loop_constant_sinking", srcs = ["while_loop_constant_sinking.cc"], hdrs = ["while_loop_constant_sinking.h"], deps = [ ":hlo", ":hlo_pass", ":while_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:inlined_vector", ], ) tf_cc_test( name = "while_loop_constant_sinking_test", srcs = ["while_loop_constant_sinking_test.cc"], deps = [ ":hlo_matchers", ":while_loop_constant_sinking", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/core:test", ], ) cc_library( name = "despecializer", srcs = ["despecializer.cc"], hdrs = ["despecializer.h"], deps = [ ":bfloat16_normalization", ":defuser", ":hlo", ":hlo_pass", ":hlo_pass_pipeline", ":implicit_broadcast_remover", "//tensorflow/compiler/xla:statusor", ], ) cc_library( name = "source_map_util", srcs = [], hdrs = ["source_map_util.h"], deps = [ ":executable", "//tensorflow/compiler/xla:status", "//tensorflow/core:lib", "@com_google_absl//absl/strings:str_format", ], ) cc_library( name = "indexed_array_analysis", srcs = ["indexed_array_analysis.cc"], hdrs = ["indexed_array_analysis.h"], deps = [ ":hlo", ":hlo_evaluator", ":hlo_pass", "//tensorflow/compiler/xla:util", "//tensorflow/core:lib", "//tensorflow/core:ptr_util", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", ], ) tf_cc_test( name = "indexed_array_analysis_test", srcs = ["indexed_array_analysis_test.cc"], deps = [ ":hlo_matchers", ":indexed_array_analysis", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla/service:hlo_parser", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:test_utils", "//tensorflow/core:test", ], ) cc_library( name = "hlo_parser", srcs = ["hlo_parser.cc"], hdrs = ["hlo_parser.h"], deps = [ ":hlo", ":hlo_lexer", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:literal_util", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib_internal", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/strings:str_format", ], ) tf_cc_test( name = "hlo_parser_test", size = "small", srcs = ["hlo_parser_test.cc"], deps = [ ":hlo", ":hlo_casting_utils", ":hlo_matchers", ":hlo_parser", "//tensorflow/compiler/xla:window_util", "//tensorflow/core:lib", "//tensorflow/core:test", "//tensorflow/core:test_main", # fixdeps: keep "@com_google_absl//absl/strings", ], ) cc_library( name = "hlo_lexer", srcs = ["hlo_lexer.cc"], hdrs = [ "hlo_lexer.h", "hlo_token.h", ], deps = [ "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:statusor", "//tensorflow/compiler/xla:types", "//tensorflow/compiler/xla:util", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/core:lib", "//tensorflow/core:regexp_internal", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", ], ) cc_library( name = "hlo_casting_utils", hdrs = ["hlo_casting_utils.h"], deps = ["//tensorflow/core:lib"], ) cc_library( name = "map_inliner", srcs = ["map_inliner.cc"], hdrs = ["map_inliner.h"], deps = [ ":hlo", ":hlo_pass", ":hlo_query", "//tensorflow/compiler/xla:status_macros", "//tensorflow/compiler/xla:types", "//tensorflow/core:lib", "@com_google_absl//absl/types:span", ], ) tf_cc_test( name = "map_inliner_test", srcs = ["map_inliner_test.cc"], deps = [ ":hlo", ":hlo_matchers", ":map_inliner", "//tensorflow/compiler/xla:literal", "//tensorflow/compiler/xla:shape_util", "//tensorflow/compiler/xla:test", "//tensorflow/compiler/xla:xla_data_proto", "//tensorflow/compiler/xla/tests:hlo_verified_test_base", "//tensorflow/compiler/xla/tests:literal_test_util", "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep "@com_google_absl//absl/memory", ], ) tf_cc_test( name = "hlo_casting_utils_test", srcs = ["hlo_casting_utils_test.cc"], deps = [ ":hlo", ":hlo_casting_utils", "//tensorflow/compiler/xla/tests:xla_internal_test_main", # fixdeps: keep "//tensorflow/core:test", ], )