diff --git a/tflite/delegates/flex/delegate.cc b/tflite/delegates/flex/delegate.cc index aef207e2..bc9c5f5e 100644 --- a/tflite/delegates/flex/delegate.cc +++ b/tflite/delegates/flex/delegate.cc @@ -154,7 +154,7 @@ TfLiteStatus FlexDelegate::CopyFromBufferHandle( return kTfLiteOk; } - tensorflow::StringPiece t_data = t.tensor_data(); + absl::string_view t_data = t.tensor_data(); if (output->bytes != t_data.size()) { TF_LITE_KERNEL_LOG(context, diff --git a/tflite/delegates/flex/tflite_subgraph_execute.cc b/tflite/delegates/flex/tflite_subgraph_execute.cc index 22459137..54a78b0d 100644 --- a/tflite/delegates/flex/tflite_subgraph_execute.cc +++ b/tflite/delegates/flex/tflite_subgraph_execute.cc @@ -332,7 +332,7 @@ class TfLiteSubgraphExecute : public OpKernel { } else if (subgraph_input->type == kTfLiteVariant) { InitializeVariantOrResource(tf_tensor, subgraph_input); } else if (!TensorCanBeShared(subgraph_input)) { - tensorflow::StringPiece tensor_data = tf_tensor.tensor_data(); + absl::string_view tensor_data = tf_tensor.tensor_data(); OP_REQUIRES(ctx, subgraph_input->bytes == tensor_data.size(), errors::Internal("tensor size doesn't match")); // TODO(b/181352924): This could incur some overhead in memory copy.