Repository navigation
[Tracking Issue][TFlite] Expand Missing / Partial Operator Coverage #19412
Description
Background
Excited to see the huge progress the community has made on the Relax TFLite frontend recently — many operators and tests have landed in the last few weeks. To keep pushing this forward, this issue tracks the remaining operator gap so contributors can pick up well-scoped items in parallel.
A. Good-first-issues — drop-in mappings
Workflow: add a handler, wire into convert_map (alphabetical within its region), add one verify(TestClass, Expected) test in tests/python/relax/test_frontend_tflite.py (pattern at L55). All target Relax ops already exist — no new op work needed.
-
CUMSUM→relax.op.cumsum -
UNIQUE→relax.op.unique -
SCATTER_ND→relax.op.scatter_nd -
BROADCAST_TO→relax.op.broadcast_to -
SIGN→relax.op.sign -
BITWISE_XOR→relax.op.bitwise_xor -
RIGHT_SHIFT→relax.op.right_shift -
BUCKETIZE→relax.op.bucketize -
EMBEDDING_LOOKUP→relax.op.take -
SELECT_V2→relax.op.where -
RELU_0_TO_1→relax.op.clip -
NON_MAX_SUPPRESSION_V4→ port from existingconvert_nms_v5
B. Medium — may need new Relax op or non-trivial decomposition
Prefer composing with existing Relax ops over adding a new op. Only register a new relax.op.* when the semantics genuinely cannot be expressed by existing primitives (e.g. random generators, bit-level reinterpret). If a decomposition using existing ops is feasible, go with that — it's a smaller PR and avoids bloating the op set.
-
REDUCE_ANY— commented attflite_frontend.py:198; can be lowered torelax.op.maxon a bool tensor, no new op needed -
REDUCE_ALL— same, lower torelax.op.minon bool -
RANK— emitrelax.const(ndim)for static shapes; no op call needed -
ATAN2— compose fromatan+sign+where, or addrelax.op.atan2for a cleaner impl -
SEGMENT_SUM— reuserelax.op.scatter_ndwithreduction="add"(TFLite requires sorted segment ids) -
UNSORTED_SEGMENT_SUM—scatter_nd(reduction="add") -
UNSORTED_SEGMENT_MAX—scatter_nd(reduction="max") -
UNSORTED_SEGMENT_MIN—scatter_nd(reduction="min") -
UNSORTED_SEGMENT_PROD—scatter_nd(reduction="mul") -
DYNAMIC_UPDATE_SLICE— reuserelax.op.slice_scatter -
DILATE— likely needs a new op (or decompose viapad+strided_slice) -
MULTINOMIAL— wrap existingrelax.op.multinomial_from_uniform; blocked onRANDOM_UNIFORM -
RANDOM_STANDARD_NORMAL— needs a new random-generator op in Relax -
RANDOM_UNIFORM— same -
BITCAST— needs a new reinterpret/view op -
BROADCAST_ARGS— shape-level computation; consider static-shape-only path first
C. Fix partial implementations
These ops are already in convert_map but their handler raises OpNotImplemented on certain input patterns, making them unusable on real models that hit those patterns.
-
RANGE— handler raises on dynamic scalar inputs (tflite_frontend.py:958); should lower torelax.op.arange. -
FILL— handler raises whendimsis non-constant (L1729); should lower torelax.op.fullwith a dynamic shape -
SPLIT_V— handler raises whensize_splitsis non-constant (L2267); decompose into dynamic strided slices. -
NON_MAX_SUPPRESSION_V5— handler raises on soft-NMS (L3546); needssoft_nms_sigma != 0support -
FAKE_QUANT— handler raises on some narrow-range vector configs (L3913)
Contributor workflow
- Claim an item by commenting on this issue before starting, so we avoid duplicated work.
- Read a recent reference PR for handler + test style.
- Add the handler, register in
convert_map(alphabetical within its region). - Add a structural-equal test following the
verify(TestClass, Expected)pattern (test_frontend_tflite.py:55). Nightly-gated E2E activates automatically viaCI_ENV_NIGHTLY. - Tag the PR title
[Relax][Frontend][TFLite].
cc @leandron
Activity
swjng commentedon Apr 17, 2026
Claiming B:
REDUCE_ANYandREDUCE_ALL— will lower torelax.op.max/relax.op.minon a bool tensor as suggested, and bundle them into a single PR.[Relax][Frontend][TFLite] Add REDUCE_ANY and REDUCE_ALL
Aharrypotter commentedon Apr 17, 2026
Hi @tlopex , I'd like to claim
NON_MAX_SUPPRESSION_V5under "Fix partial implementations" to add support forsoft_nms_sigma != 0. I will open a PR with the implementation and tests soon.[Relax][Frontend][TFLite] Add `REDUCE_ANY` and `REDUCE_ALL` (#19413)
[Relax][Frontend][TFLite] Add REDUCE_ANY and REDUCE_ALL
Dayuxiaoshui commentedon Apr 19, 2026
Hi @tlopex, I'd like to claim the following tasks:
A. Good-first-issues:
BITWISE_XOR → relax.op.bitwise_xor
RIGHT_SHIFT → relax.op.right_shift
RELU_0_TO_1 → relax.op.clip
B. Medium:
RANK — will emit relax.const for static shapes
UNSORTED_SEGMENT_MAX — will use relax.op.scatter_nd with reduction="max"
I'll open PRs for these implementations soon.
Aharrypotter commentedon Apr 19, 2026
Hi @tlopex , I'd like to claim
FILLandSPLIT_Vunder "Fix partial implementations" . I will open a PR with the implementation and tests soon.[Relax][Frontend][TFLite] Support dynamic dims in FILL and dynamic si…
Peruere1828 commentedon Apr 23, 2026
Hi @tlopex , I'd like to claim CUMSUM under "A. Good-first-issues". I will open a PR with the implementation and test soon.
0xjah commentedon Apr 24, 2026
Hi @tlopex I’d claim
FAKE_QUANTandRANGEin one pr and from AUNIQUE,BUCKETIZEandSIGN[Relax][Frontend][TFLite] Add CUMSUM operator mapping (#19434)
rknastenka commentedon Apr 25, 2026
HI @tlopex,, i'd like to work on
SCATTER_ND,BROADCAST_TO,EMBEDDING_LOOKUPandSELECT_V2snigenigmatic commentedon Apr 25, 2026
Hi @tlopex , I’d like to work on
UNSORTED_SEGMENT_SUMunder the medium category. I’ll submit a PR with implementation and tests soon. Please let me know if it’s already being worked on.[Relax][Frontend][TFLite] Add soft-NMS support for TFLite NON_MAX_SUP…
23 remaining items
Aharrypotter commentedon May 1, 2026
Hey @as4230, my bad! Looks like we commented pretty close to each other. I had the tab open without refreshing, and I didn't double-check the thread after I posted, so I totally missed your claim.
I actually already finished the code and tests for this batch locally. Would you mind if I just submit the PR since it's ready to go?
If you'd prefer to handle it yourself though, no worries at all! Sorry for the overlap.
as4230 commentedon May 1, 2026
@Aharrypotter All good, it happens. If everything's ready then go ahead and get the PR in.
[Relax][Frontend][TFLite] Add BROADCAST_TO, EMBEDDING_LOOKUP, and SEL…
[Relax][Frontend][TFLite] Add segment operator mappings (#19491)
Aharrypotter commentedon Jun 17, 2026
Hi @tlopex, I’d like to help close out the remaining unmerged items in this tracking issue.
I noticed a few of the unchecked items were claimed back in April, but I could not find corresponding merged PRs for them, and the issue has been quiet for several weeks. To avoid leaving the tracking issue stalled, I plan to work on the remaining gaps in one cleanup PR:
If anyone is already actively working on any of these, happy to coordinate or drop that part.
[Relax][Frontend][TFLite] Support dynamic RANGE scalar bounds
[Relax][Frontend][TFLite] Support dynamic RANGE scalar bounds
[Relax][Frontend][TFLite] Support dynamic RANGE scalar bounds
[Relax][Frontend][TFLite] Support dynamic RANGE scalar bounds (#19867)
Aharrypotter commentedon Jun 24, 2026
Hi @tlopex — following up on my earlier comment. I went back through the remaining unchecked boxes; with the PRs below, all of them are now addressed. Quick status:
A. Good-first-issues — all landed & tested
CUMSUM([Relax][Frontend][TFLite] Add CUMSUM operator mapping #19434),UNIQUE,SIGN,BITWISE_XOR,RIGHT_SHIFT,BUCKETIZE,RELU_0_TO_1(all in [Relax][Frontend][TFLite] Add missing TFLite operator mappings #19813)B. Medium — all landed & tested
RANK,UNSORTED_SEGMENT_SUM,UNSORTED_SEGMENT_MAX([Relax][Frontend][TFLite] Add missing TFLite operator mappings #19813); the other segment ops landed earlier in [Relax][Frontend][TFLite] Add segment operator mappings #19491DYNAMIC_UPDATE_SLICE— runtime (dynamic) start indices now supported in [Relax][Frontend][TFLite] Support dynamic DYNAMIC_UPDATE_SLICE starts #19881 (builds thescatter_ndindex grid in-graph with StableHLO clamping; the static path from [Relax][Frontend][TFLite] Support StableHLO region-based ops and multi-subgraph models #19587 is unchanged)C. Fix partial implementations
FAKE_QUANT— [Relax][Frontend][TFLite] Add missing TFLite operator mappings #19813 fixed the handler crashing on a non-existentrelax.op.constcall (switched torelax.const), which had broken the op on every invocation, and addedtest_fake_quant_narrow_range_vectoras a regression test. The builtin FAKE_QUANT parameter space (scalar min/max,narrow_range,num_bits) is fully supported (the builtin op has no per-channel/vector min/max).RANGE— runtime (dynamic) scalar bounds now supported in [Relax][Frontend][TFLite] Support dynamic RANGE scalar bounds #19867, for both integer and float, ascending or descending.Both dynamic-input items fit cleanly in the frontend:
RANGEviatensor_to_shape+match_cast,DYNAMIC_UPDATE_SLICEviascatter_ndwith runtime indices. No new Relax op was needed.Suggest closing this issue once #19881 merges. Please let me know if I've mischaracterized anything.
[Relax][Frontend][TFLite] Support dynamic DYNAMIC_UPDATE_SLICE starts (…
cchung100m commentedon Aug 21, 2026
Hi @tlopex
Thanks for the summary. I noticed that
RANK,UNSORTED_SEGMENT_SUM,UNSORTED_SEGMENT_MAX, andFAKE_QUANTare resolved by #19813.goyaladitya05 commentedon Oct 13, 2026
Hi @tlopex, I'm working on DYNAMIC_UPDATE_SLICE.
[Relax][Frontend] Add missing frontend operators: ONNX Swish/ReverseS…
[Relax][Frontend] Add missing frontend operators: ONNX Swish/ReverseS…