Skip to content

[Relax][Frontend][TFLite] Add BROADCAST_TO, EMBEDDING_LOOKUP, and SELECT_V2#19489

Merged
tlopex merged 5 commits intoapache:mainfrom
rknastenka:con
May 2, 2026
Merged

[Relax][Frontend][TFLite] Add BROADCAST_TO, EMBEDDING_LOOKUP, and SELECT_V2#19489
tlopex merged 5 commits intoapache:mainfrom
rknastenka:con

Conversation

@rknastenka
Copy link
Copy Markdown
Contributor

@rknastenka rknastenka commented May 1, 2026

This PR adds support for three new operators in the Relax TFLite frontend: BROADCAST_TO, EMBEDDING_LOOKUP, and SELECT_V2.

Passed all newly added unit tests using

pytest tests/python/relax/test_frontend_tflite.py -k "test_broadcast_to or test_embedding_lookup or test_select_v2"

reference #19412

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 updates the tvm-ffi subproject and expands the TFLite frontend for Relax by implementing support for BROADCAST_TO, EMBEDDING_LOOKUP, and SELECT_V2 operators, accompanied by new test cases. Additionally, convert_gather was updated to use astype instead of cast. Feedback focuses on ensuring the shape argument in convert_broadcast_to is correctly converted to a ShapeExpr or integer list to avoid inference errors, and recommending an explicit int32 cast for indices in convert_embedding_lookup to improve backend compatibility.

Comment thread python/tvm/relax/frontend/tflite/tflite_frontend.py
Comment thread python/tvm/relax/frontend/tflite/tflite_frontend.py
Copy link
Copy Markdown
Member

@tlopex tlopex left a comment

Choose a reason for hiding this comment

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

LGTM

@tlopex
Copy link
Copy Markdown
Member

tlopex commented May 1, 2026

Could you resolve the conflict so that we can merge it in?

@tlopex tlopex merged commit 6157f49 into apache:main May 2, 2026
8 checks passed
@rknastenka rknastenka deleted the con branch May 2, 2026 15:19
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.

2 participants