Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 716441199
  • Loading branch information
ai-edge-bot authored and copybara-github committed Jan 17, 2025
1 parent 0ab2cad commit 522053b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tflite/delegates/flex/delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tflite/delegates/flex/tflite_subgraph_execute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 522053b

Please sign in to comment.