aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/layout_util.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-10-20 12:47:57 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-10-20 12:55:39 -0700
commit5c331cfd573984287778aab02794dd86ba1f3006 (patch)
treefb36c812fbd87a51f5ecf6763461daa920aaa5bf /tensorflow/compiler/xla/layout_util.cc
parentaada11e19a1ceb901f490aa3c064f2778cb2acf2 (diff)
The new array class provides a way to simplify the implementation of
these classes by eliminating a large number of duplicated code. Removing the old API is non-trivial because of the existing users outside of tensorflow. PiperOrigin-RevId: 172920837
Diffstat (limited to 'tensorflow/compiler/xla/layout_util.cc')
-rw-r--r--tensorflow/compiler/xla/layout_util.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/layout_util.cc b/tensorflow/compiler/xla/layout_util.cc
index 011fc3c194..5c2cc2a7a9 100644
--- a/tensorflow/compiler/xla/layout_util.cc
+++ b/tensorflow/compiler/xla/layout_util.cc
@@ -83,6 +83,10 @@ Layout CreateDefaultLayoutForRank(int64 rank) {
return CreateDefaultLayoutForRank(shape.dimensions_size());
}
+/* static */ Layout LayoutUtil::GetDefaultLayoutForRank(int64 rank) {
+ return CreateDefaultLayoutForRank(rank);
+}
+
/* static */ Layout LayoutUtil::GetDefaultLayoutForR2() {
return CreateDefaultLayoutForRank(2);
}