aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/nccl
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/contrib/nccl
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/contrib/nccl')
-rw-r--r--tensorflow/contrib/nccl/kernels/nccl_rewrite.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/contrib/nccl/kernels/nccl_rewrite.cc b/tensorflow/contrib/nccl/kernels/nccl_rewrite.cc
index a4de46a93f..4676e937e5 100644
--- a/tensorflow/contrib/nccl/kernels/nccl_rewrite.cc
+++ b/tensorflow/contrib/nccl/kernels/nccl_rewrite.cc
@@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
+#include "tensorflow/core/lib/strings/str_util.h"
#if GOOGLE_CUDA
#include <forward_list>
@@ -254,7 +255,7 @@ class NcclReplacePass : public GraphOptimizationPass {
// Find reduction and broadcast ops and replace them with Send/Recv ops.
for (Node* node : graph->op_nodes()) {
StringPiece type = node->type_string();
- if (!type.starts_with("Nccl")) {
+ if (!str_util::StartsWith(type, "Nccl")) {
continue;
}
if (type == "NcclReduce") {