Skip to content
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

feat(python): don't check .sparsity in interpreter #2944

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

rkuester
Copy link
Contributor

Remove the check for sparse tensors in the Python interpreter wrapper.
This fixes a broken build when TF_LITE_STATIC_MEMORY is set, which
should always be the case in TFLM. TfLiteTensor objects don't have a
.sparsity member when TF_LITE_STATIC_MEMORY is set, so this check
can't be made.

This prepares for an upcoming commit setting TF_LITE_STATIC_MEMORY
during Bazel builds. This hasn't caused build failures in Make builds,
which have always set TF_LITE_STATIC_MEMORY, because Make builds don't
build the Python interpreter wrapper.

BUG=#2636

Remove the check for sparse tensors in the Python interpreter wrapper.
This fixes a broken build when TF_LITE_STATIC_MEMORY is set, which
should always be the case in TFLM. TfLiteTensor objects don't have a
.sparsity member when TF_LITE_STATIC_MEMORY is set, so this check
can't be made.

This prepares for an upcoming commit setting TF_LITE_STATIC_MEMORY
during Bazel builds. This hasn't caused build failures in Make builds,
which have always set TF_LITE_STATIC_MEMORY, because Make builds don't
build the Python interpreter wrapper.
@mergify mergify bot merged commit c28b493 into tensorflow:main Nov 27, 2024
84 checks passed
@rkuester rkuester deleted the feat-compression branch November 27, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants