Skip to content

Add const-tensor checks #3141

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ddavis-2015
Copy link
Member

@tensorflow/micro

Add consistent const-tensor checks and error messages across these kernels: TRANSPOSE
STRIDED_SLICE
FILL
BROADCAST_TO
EXPAND_DIMS

Modify associated kernel unit tests.

bug=fixes #3140

@tensorflow/micro

Add consistent const-tensor checks and error messages across these kernels:
TRANSPOSE
STRIDED_SLICE
FILL
BROADCAST_TO
EXPAND_DIMS

Modify associated kernel unit tests.

bug=fixes tensorflow#3140
@ddavis-2015 ddavis-2015 requested a review from a team as a code owner July 11, 2025 00:52
@ddavis-2015 ddavis-2015 self-assigned this Jul 11, 2025
@ddavis-2015 ddavis-2015 added bug Something isn't working ci:run_full labels Jul 11, 2025
@ddavis-2015 ddavis-2015 requested a review from rameshkunasi July 11, 2025 00:53
if (dims_data != nullptr) {
// dims must be a const tensor
tensors[0].allocation_type = kTfLiteMmapRo;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to have this condition after all the tensor creations are done?

output_data);
tflite::micro::KernelRunner runner =
CreateFillTestRunner(dims_shape, dims_data, value_shape, value_data,
output_shape, output_data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just want to understand few things here.

  • Is this test was successful previously?
  • Do we want to make this test fail in the prepare stage?
  • Why can't we use TestFill() API here aswell?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add const-tensor checks
3 participants