提交 a4219770 编写于 作者: K Ken Franko 提交者: TensorFlower Gardener

Fix build and reenable xla_compiler_test.

Remove const type from vectors.

PiperOrigin-RevId: 328157979
Change-Id: I8df58b0b23831b842c04c3243290ca61ecf7f4aa
上级 09781068
......@@ -716,7 +716,6 @@ tf_cc_test(
"xla_compiler_test.cc",
"xla_expression_test.cc",
],
tags = ["no_oss"],
deps = [
":common",
":side_effect_util",
......
......@@ -1903,8 +1903,8 @@ TEST_F(XlaCompilerTest, SetDeviceToHostMetadataExactDuplicate) {
XlaCompiler compiler(DefaultOptions());
const string& key = "comm_key";
std::vector<const DataType> types{DT_INT32};
std::vector<const TensorShape> shapes{TensorShape({2})};
std::vector<DataType> types{DT_INT32};
std::vector<TensorShape> 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<const DataType> types{DT_INT32};
std::vector<const TensorShape> shapes{TensorShape({2})};
std::vector<const DataType> types2{DT_FLOAT};
std::vector<const TensorShape> shapes2{TensorShape({1})};
std::vector<DataType> types{DT_INT32};
std::vector<TensorShape> shapes{TensorShape({2})};
std::vector<DataType> types2{DT_FLOAT};
std::vector<TensorShape> 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<const DataType> types{DT_INT32};
std::vector<const TensorShape> shapes{TensorShape({2})};
std::vector<DataType> types{DT_INT32};
std::vector<TensorShape> 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<const DataType> types{DT_INT32};
std::vector<const TensorShape> shapes{TensorShape({2})};
std::vector<const DataType> types2{DT_FLOAT};
std::vector<const TensorShape> shapes2{TensorShape({1})};
std::vector<DataType> types{DT_INT32};
std::vector<TensorShape> shapes{TensorShape({2})};
std::vector<DataType> types2{DT_FLOAT};
std::vector<TensorShape> shapes2{TensorShape({1})};
TF_ASSERT_OK(compiler.SetHostToDeviceMetadata(key, types, shapes));
Status status = compiler.SetHostToDeviceMetadata(key, types2, shapes2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册