diff options
author | Justin Lebar <jlebar@google.com> | 2018-08-23 10:23:44 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-23 10:27:38 -0700 |
commit | 90d9d2b1946f80e0a13babd376ec1d91cbeef266 (patch) | |
tree | e77cd4704a0db69fd5c3240f7ac87791578d22c6 /tensorflow/compiler/xla/layout_util.cc | |
parent | 5da5e8af4650287c9dcde8869ac1158d79c1415f (diff) |
[XLA] Use absl string types and functions instead of the TF versions.
Unfortunately this has to be one big patch, because e.g. absl::StrCat
doesn't accept a TF StringPiece, but as soon as we switch to
absl::string_view, we have to switch away from all of the TF functions.
PiperOrigin-RevId: 209957896
Diffstat (limited to 'tensorflow/compiler/xla/layout_util.cc')
-rw-r--r-- | tensorflow/compiler/xla/layout_util.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/layout_util.cc b/tensorflow/compiler/xla/layout_util.cc index b72d190d54..8afdc0d1b1 100644 --- a/tensorflow/compiler/xla/layout_util.cc +++ b/tensorflow/compiler/xla/layout_util.cc @@ -23,6 +23,7 @@ limitations under the License. #include <unordered_map> #include <vector> +#include "absl/strings/str_cat.h" #include "tensorflow/compiler/xla/protobuf_util.h" #include "tensorflow/compiler/xla/shape_util.h" #include "tensorflow/compiler/xla/status_macros.h" @@ -32,7 +33,6 @@ limitations under the License. #include "tensorflow/core/lib/hash/hash.h" #include "tensorflow/core/lib/strings/numbers.h" #include "tensorflow/core/lib/strings/str_util.h" -#include "tensorflow/core/lib/strings/strcat.h" #include "tensorflow/core/platform/logging.h" #include "tensorflow/core/platform/protobuf.h" @@ -403,11 +403,10 @@ Layout CreateDefaultLayoutForRank(int64 rank) { /* static */ string LayoutUtil::HumanString(const Layout& layout) { if (IsSparse(layout)) { - return tensorflow::strings::StrCat("sparse{", layout.max_sparse_elements(), - "}"); + return absl::StrCat("sparse{", layout.max_sparse_elements(), "}"); } CHECK(IsDense(layout)); - return tensorflow::strings::StrCat( + return absl::StrCat( "{", tensorflow::str_util::Join(layout.minor_to_major(), ","), "}"); } |