fnhirwa opened a new pull request, #19763:
URL: https://github.com/apache/tvm/pull/19763

   Part of https://github.com/apache/tvm/issues/19519
   
   This PR adds support for the FFT and complex operator family in the Relax 
TFLite frontend.
   
   **Key implementations:**
   
   - Registered `REAL`, `IMAG`, `COMPLEX_ABS`, and `RFFT2D` to the TFLite op 
map.
   - Implemented `convert_real` and `convert_imag` which extract the real and 
imaginary parts of a complex tensor via `strided_slice` + `squeeze` along the 
last axis.
   - Implemented `convert_complex_abs` which computes `sqrt(re^2 + im^2)` using 
elementwise Relax ops.
   - All three ops adopt a unified representation convention: TFLite 
`complex64` tensors (which have no native Relax dtype equivalent) are 
represented as `float32[..., 2]`, where the last axis holds `(real, imaginary)` 
interleaved.
   
   **What is missing:**
   
   - `RFFT2D` raises `OpNotImplemented` in this PR. A native
     `relax.op.signal.rfft2d` op with a C++ registered backend is required.
     `topi.signal.dft` exists as pure Python TE but has no
     `TVM_REGISTER_GLOBAL` entry and cannot be called via `call_dps_packed`.
   
   **Testing:**
   
   - Added structural equality tests for `REAL`, `IMAG`, and `COMPLEX_ABS` in 
`test_frontend_tflite.py` following the `verify(TestClass, Expected)` pattern.
   - `RFFT2D` test covers frontend conversion correctness.
   
   ```bash
   python3 -m pytest tests/python/relax/test_frontend_tflite.py -k "test_real 
or test_imag or test_complex_abs"
   ```


-- 
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]

Reply via email to