aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/kernel.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-03-27 12:00:44 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-27 12:03:22 -0700
commitfd77211de17bf053cc8f5a82c8eff1818451120c (patch)
tree9375474620e8129f220d741b6407692a06554f70 /tensorflow/stream_executor/kernel.cc
parentaec2496567a7bfd508fc487dec474263b6a7481f (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: 190650553
Diffstat (limited to 'tensorflow/stream_executor/kernel.cc')
-rw-r--r--tensorflow/stream_executor/kernel.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/stream_executor/kernel.cc b/tensorflow/stream_executor/kernel.cc
index 81e531efb3..636199cfa2 100644
--- a/tensorflow/stream_executor/kernel.cc
+++ b/tensorflow/stream_executor/kernel.cc
@@ -21,6 +21,7 @@ limitations under the License.
#include "tensorflow/stream_executor/platform/port.h"
+#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/stream_executor/lib/demangle.h"
#include "tensorflow/stream_executor/platform.h"
#include "tensorflow/stream_executor/platform/logging.h"
@@ -96,7 +97,7 @@ static const char *kStubPrefix = "__device_stub_";
void KernelBase::set_name(port::StringPiece name) {
name_ = name.ToString();
port::StringPiece stubless_name = name;
- if (name.starts_with(kStubPrefix)) {
+ if (tensorflow::str_util::StartsWith(name, kStubPrefix)) {
stubless_name.remove_prefix(strlen(kStubPrefix));
}
demangled_name_ = port::Demangle(stubless_name.data());