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

TF_SelectV2Op gets legalized to TFL_SelectOp #383

Open
gaikwadrahul8 opened this issue Nov 26, 2024 · 1 comment
Open

TF_SelectV2Op gets legalized to TFL_SelectOp #383

gaikwadrahul8 opened this issue Nov 26, 2024 · 1 comment
Assignees

Comments

@gaikwadrahul8
Copy link

1. System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 22.04
  • TensorFlow installation (pip package or built from source): pip package
  • TensorFlow library (version, if pip package or github SHA, if built from source): v2.17.0

2. Code

tf.where(condition, x, y)

3. Failure after conversion

The model cannot run on TFLite Micro, as it doesn't support the old SELECT op, only the new SELECT_V2 one.

5. (optional) Any other info / logs

The change was introduced 5 years ago by @abattery to improve compatibility with the older runtimes: tensorflow/tensorflow@061d2e0
But now it breaks compatibility with TFLite Micro, which only supports the newer op.
Here's the legalization in question: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/compiler/mlir/lite/transforms/legalize_patterns.td#L302
UPD: I believe that #93 is basically the same.

@gaikwadrahul8
Copy link
Author

This issue originally reported by @tagunil has been moved to this dedicated repository for ai-edge-torch to enhance issue tracking and prioritization. To ensure continuity, we have created this new issue on your behalf.

We appreciate your understanding and look forward to your continued involvement.

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

No branches or pull requests

1 participant