Skip to content

[Relax][Frontend][TFLite] Add bucketize/unique/sign + fixes#19522

Open
0xjah wants to merge 3 commits intoapache:mainfrom
0xjah:relax-tflite-missing-ops
Open

[Relax][Frontend][TFLite] Add bucketize/unique/sign + fixes#19522
0xjah wants to merge 3 commits intoapache:mainfrom
0xjah:relax-tflite-missing-ops

Conversation

@0xjah
Copy link
Copy Markdown
Contributor

@0xjah 0xjah commented May 8, 2026

Summary

  • add Relax TFLite handlers for BUCKETIZE, UNIQUE, SIGN, and RELU_0_TO_1
  • allow RANGE with dynamic scalar operands and guard FAKE_QUANT degenerate ranges
  • extend TFLite frontend tests for sign/unique/bucketize/fake_quant and dynamic range

Testing

  • not run (not requested)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for several TFLite operators—BUCKETIZE, RELU_0_TO_1, SIGN, and UNIQUE—to the Relax frontend and enables dynamic scalar inputs for the RANGE operator. It also hardens FAKE_QUANT against division-by-zero errors in degenerate ranges. Review feedback identifies a semantic mismatch in the BUCKETIZE implementation regarding boundary matching, suggests using math.floor(x + 0.5) for TFLite-compliant rounding in quantized RELU_0_TO_1, and recommends adding a specific test case for the FAKE_QUANT degenerate range fix.

Comment thread python/tvm/relax/frontend/tflite/tflite_frontend.py Outdated
Comment thread tests/python/relax/test_frontend_tflite.py
Comment thread python/tvm/relax/frontend/tflite/tflite_frontend.py Outdated
Comment thread python/tvm/relax/frontend/tflite/tflite_frontend.py Outdated
Comment thread tests/python/relax/test_frontend_tflite.py
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.

1 participant