Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 621803695
  • Loading branch information
tensorflower-gardener committed Apr 4, 2024
1 parent e0cf153 commit ca51251
Show file tree
Hide file tree
Showing 18 changed files with 134 additions and 37 deletions.
71 changes: 55 additions & 16 deletions third_party/xla/xla/service/cpu/tests/BUILD
Expand Up @@ -67,8 +67,12 @@ xla_cc_test(
srcs = ["cpu_dyn_shape_test.cc"],
deps = [
":cpu_codegen_test",
"//xla:shape_util",
"//xla:xla_data_proto_cc",
"//xla/hlo/ir:hlo",
"//xla/service/cpu:cpu_compiler",
"//xla/service/cpu:test_header_helper",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/platform:test_main",
],
)
Expand All @@ -77,9 +81,12 @@ xla_cc_test(
name = "cpu_fusion_test",
srcs = ["cpu_fusion_test.cc"],
deps = [
"//xla:error_spec",
"//xla:literal",
"//xla:literal_util",
"//xla:shape_util",
"//xla:xla_data_proto_cc",
"//xla:xla_proto_cc",
"//xla/hlo/ir:hlo",
"//xla/service:cpu_plugin",
"//xla/service/cpu:cpu_instruction_fusion",
Expand All @@ -95,7 +102,9 @@ xla_cc_test(
srcs = ["cpu_bytesizeof_test.cc"],
deps = [
"//xla:shape_util",
"//xla:xla_data_proto_cc",
"//xla/service/llvm_ir:llvm_util",
"@llvm-project//llvm:ir_headers",
"@local_tsl//tsl/platform:test",
"@local_tsl//tsl/platform:test_main",
],
Expand All @@ -107,9 +116,10 @@ xla_cc_test(
deps = [
":cpu_codegen_test",
"//xla:array2d",
"//xla:literal_util",
"//xla:shape_util",
"//xla:xla_data_proto_cc",
"//xla/hlo/ir:hlo",
"//xla/tests:filecheck",
"@local_tsl//tsl/platform:test",
],
)
Expand All @@ -120,14 +130,21 @@ xla_cc_test(
deps = [
":cpu_codegen_test",
"//xla:literal",
"//xla:literal_util",
"//xla:shape_util",
"//xla:status",
"//xla:xla_data_proto_cc",
"//xla/hlo/ir:hlo",
"//xla/service:buffer_assignment",
"//xla/service:hlo_ordering",
"//xla/service:logical_buffer",
"//xla/service/llvm_ir:alias_analysis",
"//xla/service/llvm_ir:ir_array",
"//xla/service/llvm_ir:llvm_util",
"//xla/tests:filecheck",
"@llvm-project//llvm:Core",
"@llvm-project//llvm:Support",
"@local_tsl//tsl/platform:statusor",
"@local_tsl//tsl/platform:test",
"@local_tsl//tsl/platform:test_main",
],
Expand All @@ -138,9 +155,14 @@ xla_cc_test(
srcs = ["cpu_intrinsic_test.cc"],
deps = [
":cpu_codegen_test",
"//xla:shape_util",
"//xla:xla_data_proto_cc",
"//xla:xla_proto_cc",
"//xla/hlo/ir:hlo",
"//xla/service/cpu:cpu_compiler",
"//xla/tests:hlo_test_base",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@llvm-project//llvm:ARMCodeGen", # fixdeps: keep
"@llvm-project//llvm:Target",
"@llvm-project//llvm:X86CodeGen", # fixdeps: keep
Expand All @@ -156,11 +178,13 @@ xla_cc_test(
tags = ["no_mac_arm64"],
deps = [
":cpu_codegen_test",
"//xla:shape_util",
"//xla:xla_data_proto_cc",
"//xla/hlo/ir:hlo",
"//xla/service/cpu:cpu_compiler",
"//xla/service/cpu:test_header_helper",
"//xla/tests:test_utils",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/platform:test",
"@local_tsl//tsl/platform:test_main",
],
Expand All @@ -174,6 +198,7 @@ xla_cc_test(
"//xla/hlo/ir:hlo",
"//xla/service/cpu:cpu_compiler",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@llvm-project//llvm:ARMCodeGen", # fixdeps: keep
"@llvm-project//llvm:Target",
"@llvm-project//llvm:X86CodeGen", # fixdeps: keep
Expand All @@ -187,16 +212,7 @@ xla_cc_test(
srcs = ["tree_reduction_rewriter_test.cc"],
deps = [
":cpu_codegen_test",
"//xla:statusor",
"//xla/hlo/ir:hlo",
"//xla/service:hlo_module_config",
"//xla/service:hlo_parser",
"//xla/service/cpu:cpu_compiler",
"//xla/tests:filecheck",
"//xla/tests:hlo_test_base",
"//xla/tests:llvm_irgen_test_base",
"@local_tsl//tsl/lib/core:status_test_util",
"@local_tsl//tsl/platform:statusor",
"@local_tsl//tsl/platform:test",
"@local_tsl//tsl/platform:test_main",
],
Expand All @@ -206,9 +222,10 @@ xla_cc_test(
name = "cpu_infeed_test",
srcs = ["cpu_infeed_test.cc"],
deps = [
"//xla:error_spec",
"//xla:literal",
"//xla:literal_util",
"//xla:shape_util",
"//xla:statusor",
"//xla:test_helpers",
"//xla:xla_data_proto_cc",
"//xla/client:global_data",
Expand All @@ -230,9 +247,11 @@ xla_cc_test(
srcs = ["cpu_literal_caching_test.cc"],
deps = [
":cpu_codegen_test",
"//xla/service:hlo_parser",
"//xla/hlo/ir:hlo",
"//xla/service/cpu:cpu_compiler",
"//xla/service/cpu:test_header_helper",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/platform:statusor",
"@local_tsl//tsl/platform:test_main",
],
)
Expand All @@ -244,6 +263,8 @@ xla_cc_test(
":cpu_codegen_test",
"//xla/service/cpu:cpu_compiler",
"//xla/service/cpu:test_header_helper",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/platform:statusor",
"@local_tsl//tsl/platform:test_main",
],
)
Expand All @@ -255,6 +276,8 @@ xla_cc_test(
":cpu_codegen_test",
"//xla/service/cpu:cpu_compiler",
"//xla/service/cpu:test_header_helper",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/platform:statusor",
"@local_tsl//tsl/platform:test_main",
],
)
Expand All @@ -264,12 +287,12 @@ xla_cc_test(
srcs = ["cpu_spmd_compile_test.cc"],
deps = [
":cpu_codegen_test",
"//xla/hlo/utils:hlo_query",
"//xla:debug_options_flags",
"//xla/service:executable",
"//xla/service:hlo_module_config",
"//xla/service:hlo_parser",
"//xla/service/cpu:cpu_compiler",
"//xla/service/cpu:test_header_helper",
"//xla/tests:hlo_test_base",
"@com_google_absl//absl/status:statusor",
"@local_tsl//tsl/lib/core:status_test_util",
"@local_tsl//tsl/platform:test",
"@local_tsl//tsl/platform:test_main",
Expand All @@ -281,10 +304,17 @@ xla_cc_test(
srcs = ["cpu_topk_test.cc"],
deps = [
":cpu_codegen_test",
"//xla:shape_util",
"//xla:xla_data_proto_cc",
"//xla/client:xla_builder",
"//xla/client:xla_computation",
"//xla/client/lib:sorting",
"//xla/hlo/ir:hlo",
"//xla/service:hlo_module_config",
"//xla/service/cpu:cpu_compiler",
"//xla/service/cpu:test_header_helper",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/platform:statusor",
"@local_tsl//tsl/platform:test_main",
],
)
Expand All @@ -294,9 +324,15 @@ xla_cc_test(
srcs = ["cpu_vectorization_test.cc"],
deps = [
":cpu_codegen_test",
"//xla:shape_util",
"//xla:xla_data_proto_cc",
"//xla:xla_proto_cc",
"//xla/hlo/ir:hlo",
"//xla/service/cpu:cpu_compiler",
"//xla/tests:hlo_test_base",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
"@llvm-project//llvm:ARMCodeGen", # fixdeps: keep
"@llvm-project//llvm:Target",
"@llvm-project//llvm:X86CodeGen", # fixdeps: keep
Expand All @@ -311,8 +347,11 @@ xla_cc_test(
deps = [
":cpu_codegen_test",
"//xla/service/cpu:cpu_compiler",
"//xla/tests:literal_test_util",
"@com_google_googletest//:gtest_main",
"@llvm-project//llvm:ARMCodeGen", # fixdeps: keep
"@llvm-project//llvm:X86CodeGen", # fixdeps: keep
"@local_tsl//tsl/platform:statusor",
"@local_tsl//tsl/platform:test_main",
],
)
2 changes: 2 additions & 0 deletions third_party/xla/xla/service/cpu/tests/cpu_bytesizeof_test.cc
Expand Up @@ -13,8 +13,10 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "llvm/IR/DataLayout.h"
#include "xla/service/llvm_ir/llvm_util.h"
#include "xla/shape_util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/test.h"

class CpuByteSizeOfTest : public ::testing::Test {};
Expand Down
7 changes: 7 additions & 0 deletions third_party/xla/xla/service/cpu/tests/cpu_dyn_shape_test.cc
Expand Up @@ -15,9 +15,16 @@ limitations under the License.

#include <memory>

#include <gtest/gtest.h>
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/service/cpu/cpu_compiler.h"
#include "xla/service/cpu/test_target_triple_helper.h"
#include "xla/service/cpu/tests/cpu_codegen_test.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/xla_data.pb.h"

namespace xla {
namespace cpu {
Expand Down
Expand Up @@ -18,12 +18,15 @@ limitations under the License.
#include <algorithm>
#include <string>

#include "absl/strings/str_cat.h"
#include <gtest/gtest.h>
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/service/cpu/cpu_compiler.h"
#include "xla/service/cpu/test_target_triple_helper.h"
#include "xla/service/cpu/tests/cpu_codegen_test.h"
#include "xla/shape_util.h"
#include "xla/tests/test_utils.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/test.h"

namespace xla {
Expand Down
Expand Up @@ -20,9 +20,11 @@ limitations under the License.
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/literal_util.h"
#include "xla/service/cpu/tests/cpu_codegen_test.h"
#include "xla/shape_util.h"
#include "xla/tests/filecheck.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/test.h"

namespace xla {
Expand Down
5 changes: 4 additions & 1 deletion third_party/xla/xla/service/cpu/tests/cpu_fusion_test.cc
Expand Up @@ -17,15 +17,18 @@ limitations under the License.
#include <utility>
#include <vector>

#include "xla/error_spec.h"
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/service/cpu/cpu_instruction_fusion.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/literal_test_util.h"
#include "xla/xla.pb.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/test.h"

Expand Down
6 changes: 5 additions & 1 deletion third_party/xla/xla/service/cpu/tests/cpu_infeed_test.cc
Expand Up @@ -13,6 +13,11 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/error_spec.h"
#include "xla/layout.h"
#include "xla/layout_util.h"
#include "xla/literal_util.h"
#include "xla/shape.h"
#ifndef _WIN32
#include <unistd.h>
#endif
Expand All @@ -26,7 +31,6 @@ limitations under the License.
#include "xla/client/xla_computation.h"
#include "xla/literal.h"
#include "xla/shape_util.h"
#include "xla/statusor.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/literal_test_util.h"
Expand Down
8 changes: 8 additions & 0 deletions third_party/xla/xla/service/cpu/tests/cpu_intrinsic_test.cc
Expand Up @@ -16,12 +16,20 @@ limitations under the License.
#include <algorithm>
#include <string>

#include <gtest/gtest.h>
#include "absl/strings/ascii.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "llvm-c/Target.h"
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/service/cpu/cpu_compiler.h"
#include "xla/service/cpu/tests/cpu_codegen_test.h"
#include "xla/shape_util.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/xla.pb.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/test.h"

namespace xla {
Expand Down
Expand Up @@ -15,9 +15,11 @@ limitations under the License.

#include <memory>

#include <gtest/gtest.h>
#include "xla/service/cpu/cpu_compiler.h"
#include "xla/service/cpu/test_target_triple_helper.h"
#include "xla/service/cpu/tests/cpu_codegen_test.h"
#include "tsl/platform/statusor.h"

namespace xla {
namespace cpu {
Expand Down
Expand Up @@ -13,10 +13,12 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include <gtest/gtest.h>
#include "xla/hlo/ir/hlo_module.h"
#include "xla/service/cpu/cpu_compiler.h"
#include "xla/service/cpu/test_target_triple_helper.h"
#include "xla/service/cpu/tests/cpu_codegen_test.h"
#include "xla/service/hlo_parser.h"
#include "tsl/platform/statusor.h"

namespace xla {
namespace cpu {
Expand Down

0 comments on commit ca51251

Please sign in to comment.