diff options
author | 2017-07-21 11:43:35 -0700 | |
---|---|---|
committer | 2017-07-21 11:47:42 -0700 | |
commit | ae0207d3820308d882253c85fe58494b818f254d (patch) | |
tree | 451f4af9fc710a4b16fe016cc9fc5ac4d666c646 /tensorflow/compiler/xla/layout_util_test.cc | |
parent | 40bf259e711b84744177e89574c88b59cc1f3030 (diff) |
[XLA] Remove the xla_default_layout flag.
The default layout is just major-to-minor, as we don't have sufficient testing
for alternative default layouts.
PiperOrigin-RevId: 162766231
Diffstat (limited to 'tensorflow/compiler/xla/layout_util_test.cc')
-rw-r--r-- | tensorflow/compiler/xla/layout_util_test.cc | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/tensorflow/compiler/xla/layout_util_test.cc b/tensorflow/compiler/xla/layout_util_test.cc index d3fcccff65..331bb9afa9 100644 --- a/tensorflow/compiler/xla/layout_util_test.cc +++ b/tensorflow/compiler/xla/layout_util_test.cc @@ -14,7 +14,6 @@ limitations under the License. ==============================================================================*/ #include "tensorflow/compiler/xla/layout_util.h" -#include "tensorflow/compiler/xla/legacy_flags/layout_util_flags.h" #include "tensorflow/compiler/xla/shape_util.h" #include "tensorflow/compiler/xla/test.h" #include "tensorflow/compiler/xla/test_helpers.h" @@ -210,13 +209,6 @@ TEST_F(LayoutUtilTest, IsPadded) { } TEST_F(LayoutUtilTest, DefaultLayoutGettersMajorToMinor) { - // Test that LayoutUtil returns expected layouts when the xla_default_layout - // flag is set to kMajorToMinor. - legacy_flags::LayoutUtilFlags* flags = legacy_flags::GetLayoutUtilFlags(); - flags->xla_default_layout = xla::legacy_flags::DefaultLayout{ - .dimension_order = - legacy_flags::DefaultLayout::DimensionOrder::kMajorToMinor}; - EXPECT_TRUE(LayoutUtil::Equal(LayoutUtil::MakeLayout({1, 0}), LayoutUtil::GetDefaultLayoutForR2())); EXPECT_TRUE(LayoutUtil::Equal(LayoutUtil::MakeLayout({2, 1, 0}), @@ -229,25 +221,5 @@ TEST_F(LayoutUtilTest, DefaultLayoutGettersMajorToMinor) { ShapeUtil::MakeShape(F32, {10, 20, 30, 15, 25})))); } -TEST_F(LayoutUtilTest, DefaultLayoutGettersMinorToMajor) { - // Test that LayoutUtil returns expected layouts when the xla_default_layout - // flag is set to kMinorToMajor. - legacy_flags::LayoutUtilFlags* flags = legacy_flags::GetLayoutUtilFlags(); - flags->xla_default_layout = xla::legacy_flags::DefaultLayout{ - .dimension_order = - legacy_flags::DefaultLayout::DimensionOrder::kMinorToMajor}; - - EXPECT_TRUE(LayoutUtil::Equal(LayoutUtil::MakeLayout({0, 1}), - LayoutUtil::GetDefaultLayoutForR2())); - EXPECT_TRUE(LayoutUtil::Equal(LayoutUtil::MakeLayout({0, 1, 2}), - LayoutUtil::GetDefaultLayoutForR3())); - EXPECT_TRUE(LayoutUtil::Equal(LayoutUtil::MakeLayout({0, 1, 2, 3}), - LayoutUtil::GetDefaultLayoutForR4())); - EXPECT_TRUE( - LayoutUtil::Equal(LayoutUtil::MakeLayout({0, 1, 2, 3, 4}), - LayoutUtil::GetDefaultLayoutForShape( - ShapeUtil::MakeShape(F32, {10, 20, 30, 15, 25})))); -} - } // namespace } // namespace xla |