From a4219770e99f05e3aea87f5a19c79ac691cc7501 Mon Sep 17 00:00:00 2001 From: Ken Franko Date: Mon, 24 Aug 2020 09:54:33 -0700 Subject: [PATCH] Fix build and reenable xla_compiler_test. Remove const type from vectors. PiperOrigin-RevId: 328157979 Change-Id: I8df58b0b23831b842c04c3243290ca61ecf7f4aa --- tensorflow/compiler/tf2xla/BUILD | 1 - .../compiler/tf2xla/xla_compiler_test.cc | 24 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/tensorflow/compiler/tf2xla/BUILD b/tensorflow/compiler/tf2xla/BUILD index 2496fbe029d..e9bcbcc6d83 100644 --- a/tensorflow/compiler/tf2xla/BUILD +++ b/tensorflow/compiler/tf2xla/BUILD @@ -716,7 +716,6 @@ tf_cc_test( "xla_compiler_test.cc", "xla_expression_test.cc", ], - tags = ["no_oss"], deps = [ ":common", ":side_effect_util", diff --git a/tensorflow/compiler/tf2xla/xla_compiler_test.cc b/tensorflow/compiler/tf2xla/xla_compiler_test.cc index b932a774a06..f348552050b 100644 --- a/tensorflow/compiler/tf2xla/xla_compiler_test.cc +++ b/tensorflow/compiler/tf2xla/xla_compiler_test.cc @@ -1903,8 +1903,8 @@ TEST_F(XlaCompilerTest, SetDeviceToHostMetadataExactDuplicate) { XlaCompiler compiler(DefaultOptions()); const string& key = "comm_key"; - std::vector types{DT_INT32}; - std::vector shapes{TensorShape({2})}; + std::vector types{DT_INT32}; + std::vector shapes{TensorShape({2})}; TF_ASSERT_OK(compiler.SetDeviceToHostMetadata(key, types, shapes)); TF_ASSERT_OK(compiler.SetDeviceToHostMetadata(key, types, shapes)); @@ -1916,10 +1916,10 @@ TEST_F(XlaCompilerTest, SetDeviceToHostMetadataMismatchedDuplicate) { XlaCompiler compiler(DefaultOptions()); const string& key = "comm_key"; - std::vector types{DT_INT32}; - std::vector shapes{TensorShape({2})}; - std::vector types2{DT_FLOAT}; - std::vector shapes2{TensorShape({1})}; + std::vector types{DT_INT32}; + std::vector shapes{TensorShape({2})}; + std::vector types2{DT_FLOAT}; + std::vector shapes2{TensorShape({1})}; TF_ASSERT_OK(compiler.SetDeviceToHostMetadata(key, types, shapes)); Status status = compiler.SetDeviceToHostMetadata(key, types2, shapes2); @@ -1932,8 +1932,8 @@ TEST_F(XlaCompilerTest, SetHostToDeviceMetadataExactDuplicate) { XlaCompiler compiler(DefaultOptions()); const string& key = "comm_key"; - std::vector types{DT_INT32}; - std::vector shapes{TensorShape({2})}; + std::vector types{DT_INT32}; + std::vector shapes{TensorShape({2})}; TF_ASSERT_OK(compiler.SetHostToDeviceMetadata(key, types, shapes)); TF_ASSERT_OK(compiler.SetHostToDeviceMetadata(key, types, shapes)); @@ -1945,10 +1945,10 @@ TEST_F(XlaCompilerTest, SetHostToDeviceMetadataMismatchedDuplicate) { XlaCompiler compiler(DefaultOptions()); const string& key = "comm_key"; - std::vector types{DT_INT32}; - std::vector shapes{TensorShape({2})}; - std::vector types2{DT_FLOAT}; - std::vector shapes2{TensorShape({1})}; + std::vector types{DT_INT32}; + std::vector shapes{TensorShape({2})}; + std::vector types2{DT_FLOAT}; + std::vector shapes2{TensorShape({1})}; TF_ASSERT_OK(compiler.SetHostToDeviceMetadata(key, types, shapes)); Status status = compiler.SetHostToDeviceMetadata(key, types2, shapes2);