Skip to content

merge queue: embarking main (bbf70db) and #3139 together #3142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tensorflow/lite/micro/kernels/pad_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ TfLiteStatus PadPrepare(TfLiteContext* context, TfLiteNode* node) {
// On Micro, outputs must be properly sized by the converter.
// NOTE: This data is only available because the paddings buffer is stored in
// the flatbuffer:
TF_LITE_ENSURE(context, IsConstantTensor(paddings));
TF_LITE_ENSURE_MSG(context, IsConstantTensor(paddings),
"Non-constant >paddings< tensor is not supported");
const int32_t* paddings_data = GetTensorData<int32_t>(paddings);
for (int i = 0; i < output->dims->size; i++) {
int output_dim = output->dims->data[i];
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/lite/micro/kernels/resize_bilinear.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
/* Copyright 2025 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -50,7 +50,7 @@ TfLiteStatus ResizeBilinearPrepare(TfLiteContext* context, TfLiteNode* node) {
output->type = input->type;

TF_LITE_ENSURE_MSG(context, IsConstantTensor(size),
"Non constant size tensor not supported");
"Non-constant >size< tensor is not supported");

// Ensure params are valid.
auto* params =
Expand Down
8 changes: 3 additions & 5 deletions tensorflow/lite/micro/kernels/resize_nearest_neighbor.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved.
/* Copyright 2025 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -54,10 +54,8 @@ TfLiteStatus ResizeNearestNeighborPrepare(TfLiteContext* context,

output->type = input->type;

if (!IsConstantTensor(size)) {
MicroPrintf("Dynamic tensors are unsupported in tfmicro.");
return kTfLiteError;
}
TF_LITE_ENSURE_MSG(context, IsConstantTensor(size),
"Non-constant >size< tensor is not supported");

micro_context->DeallocateTempTfLiteTensor(input);
micro_context->DeallocateTempTfLiteTensor(size);
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/lite/micro/kernels/split.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved.
/* Copyright 2025 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -76,7 +76,7 @@ TfLiteStatus SplitPrepare(TfLiteContext* context, TfLiteNode* node) {
// But Micro doesn't support dynamic memory allocation, so we only support
// constant axis tensor for now.
TF_LITE_ENSURE_MSG(context, IsConstantTensor(axis),
"Non constant axis tensor not supported");
"Non-constant >axis< tensor is not supported");

micro_context->DeallocateTempTfLiteTensor(axis);
return kTfLiteOk;
Expand Down
4 changes: 2 additions & 2 deletions tensorflow/lite/micro/kernels/split_v.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2023 The TensorFlow Authors. All Rights Reserved.
/* Copyright 2025 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,7 +80,7 @@ TfLiteStatus SplitVPrepare(TfLiteContext* context, TfLiteNode* node) {
// constant axis tensor for now.
TfLiteTensor* axis = micro_context->AllocateTempInputTensor(node, 2);
TF_LITE_ENSURE_MSG(context, IsConstantTensor(axis),
"Non constant axis tensor not supported");
"Non-constant >axis< tensor is not supported");
micro_context->DeallocateTempTfLiteTensor(axis);
return kTfLiteOk;
}
Expand Down
5 changes: 3 additions & 2 deletions tensorflow/lite/micro/kernels/xtensa/pad.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
/* Copyright 2025 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -91,7 +91,8 @@ TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
// On Micro, outputs must be properly sized by the converter.
// NOTE: This data is only available because the paddings buffer is stored in
// the flatbuffer:
TF_LITE_ENSURE(context, IsConstantTensor(paddings));
TF_LITE_ENSURE_MSG(context, IsConstantTensor(paddings),
"Non-constant >paddings< tensor is not supported");
const int32_t* paddings_data = GetTensorData<int32_t>(paddings);
for (int i = 0; i < output->dims->size; i++) {
int output_dim = output->dims->data[i];
Expand Down