aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/grappler/op_types.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-04-02 14:46:13 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-02 14:48:43 -0700
commit8f543ed7e3e2775aedb5c953f7f5cbff2139663a (patch)
tree06040261b7965ed031a6588eb1a0a15d4ea0e299 /tensorflow/core/grappler/op_types.cc
parent817882c28fd6f0dbbbf35b6ac0764ccbd38430d0 (diff)
Replaced calls to deprecated tensorflow::StringPiece methods with their
tensorflow::str_util equivalents. This will allow the deprecated methods to be removed. PiperOrigin-RevId: 191350894
Diffstat (limited to 'tensorflow/core/grappler/op_types.cc')
-rw-r--r--tensorflow/core/grappler/op_types.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/core/grappler/op_types.cc b/tensorflow/core/grappler/op_types.cc
index e0ee49d157..e12e432a33 100644
--- a/tensorflow/core/grappler/op_types.cc
+++ b/tensorflow/core/grappler/op_types.cc
@@ -21,6 +21,7 @@ limitations under the License.
#include "tensorflow/core/grappler/op_types.h"
#include "tensorflow/core/grappler/utils.h"
#include "tensorflow/core/lib/core/status.h"
+#include "tensorflow/core/lib/strings/str_util.h"
namespace tensorflow {
namespace grappler {
@@ -409,7 +410,7 @@ bool ModifiesInputsInPlace(const NodeDef& node) {
// Some nodes do in-place updates on regular tensor inputs.
string op_name = node.op();
std::transform(op_name.begin(), op_name.end(), op_name.begin(), ::tolower);
- if (StringPiece(op_name).contains("inplace")) {
+ if (str_util::StrContains(op_name, "inplace")) {
return true;
}
return GetBoolAttr(node, "in_place") || GetBoolAttr(node, "inplace");