Aharrypotter opened a new pull request, #19813:
URL: https://github.com/apache/tvm/pull/19813
## Summary
This PR helps close the remaining actionable Relax TFLite frontend gaps
tracked in
apache/tvm#19412.
Implemented operator coverage:
- Add drop-in mappings for `SIGN`, `BITWISE_XOR`, `RIGHT_SHIFT`, `BUCKETIZE`,
`RELU_0_TO_1`, and `UNIQUE`.
- Add `RANK` as a static rank constant.
- Add `UNSORTED_SEGMENT_SUM` and `UNSORTED_SEGMENT_MAX` through the existing
`scatter_nd`-based segment lowering.
- Fix `FAKE_QUANT` narrow-range vector conversion by using proper Relax
constants.
Notes on tracking status:
- `CUMSUM` is already implemented on current `main`, so this PR does not
duplicate it.
- `STABLEHLO_DYNAMIC_UPDATE_SLICE` is already implemented on current `main`;
the
current TFLite schema path here exposes that StableHLO builtin rather than
a
separate plain `DYNAMIC_UPDATE_SLICE` builtin.
- `RANGE` with runtime scalar inputs remains unsupported because current
`relax.op.arange` requires `PrimValue` arguments, not scalar tensor values.
The existing unsupported test is intentionally kept.
## Testing
```bash
conda run -n tvm-dev python -m pytest
tests/python/relax/test_frontend_tflite.py -k "unique or sign or bitwise_xor or
right_shift or bucketize or relu_0_to_1 or rank or unsorted_segment_sum or
unsorted_segment_max or range or fake_quant or dynamic_update_slice"
```
Result: `22 passed, 511 deselected`.
```bash
conda run -n tvm-dev python -m pytest
tests/python/relax/test_frontend_tflite.py
```
Result: `533 passed`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]