Files
apache--tvm/python
Soowon Jeong f0af322c19 [Relax][Frontend][TFLite] Add REDUCE_ANY and REDUCE_ALL (#19413)
## Summary

Adds TFLite frontend support for `REDUCE_ANY` and `REDUCE_ALL` (B-group
item in #19412).

## Lowering

`REDUCE_ANY` / `REDUCE_ALL` take bool tensors and compute logical OR /
AND along the given axes. Max / min on a bool tensor produces the same
result, so no new Relax op is required:

- `REDUCE_ANY` → `relax.op.max`
- `REDUCE_ALL` → `relax.op.min`

Both reuse the existing `_convert_reduce` handler (shared with
`REDUCE_MAX`, `REDUCE_MIN`, `REDUCE_PROD`, `MEAN`, `SUM`), with entries
added alphabetically to `convert_map`.

## Testing

Added `test_reduction_bool_ops` in
`tests/python/relax/test_frontend_tflite.py`, parametrized over the same
shape / axes / keepdims matrix as the existing `test_reduction_ops` (24
combinations total). Verified locally by running the test function
directly across all parametrizations.

Refs #19412.
2026-04-17 02:19:10 -04:00
..