Skip to content

[Relax][TFLite] Add NON_MAX_SUPPRESSION_V5 support#19349

Merged
tlopex merged 2 commits intoapache:mainfrom
rknastenka:main
Apr 4, 2026
Merged

[Relax][TFLite] Add NON_MAX_SUPPRESSION_V5 support#19349
tlopex merged 2 commits intoapache:mainfrom
rknastenka:main

Conversation

@rknastenka
Copy link
Copy Markdown
Contributor

@rknastenka rknastenka commented Apr 4, 2026

Partially resolves #18928

to run the tests:

pytest tests/python/relax/test_frontend_tflite.py -v -k "nms"
image

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 implements the NON_MAX_SUPPRESSION_V5 operator in the TFLite frontend for TVM Relax, replacing a previous placeholder with a functional implementation and adding comprehensive tests. The feedback highlights that the output tensors should be truncated to max_output_size to ensure shape consistency with TFLite's behavior. Additionally, it is recommended to use the actual number of input boxes as the upper bound for index clipping to improve memory safety, and to update the IR verification tests to assert the correct output shapes based on the maximum output size.

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! Thanks!

@tlopex tlopex merged commit 28aac47 into apache:main Apr 4, 2026
10 checks passed
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.

[Tracking Issue] Add missing vision/image operators

2 participants