fnhirwa opened a new issue, #19764:
URL: https://github.com/apache/tvm/issues/19764

   ### Background
   
   The Relax TFLite frontend PR (https://github.com/apache/tvm/pull/19763) adds 
support for the FFT/complex operator family
   (`REAL`, `IMAG`, `COMPLEX_ABS`, `RFFT2D`). `REAL`, `IMAG`, and `COMPLEX_ABS`
   are fully implemented. `RFFT2D` currently raises `OpNotImplemented` because 
no
   viable lowering path exists.
   
   ### Problem
   
   `topi.signal.dft` exists in `python/tvm/topi/signal.py` as a pure Python TE
   extern but has no `TVM_REGISTER_GLOBAL` entry anywhere in `src/`. Verified:
   
   ```bash
   grep -rn "TVM_REGISTER_GLOBAL.*dft\|TVM_REGISTER_GLOBAL.*fft" src/ 
--include="*.cc"
   # empty
   
   python3 -c "import tvm, tvm.topi; 
print(tvm.get_global_func('topi.signal.dft', allow_missing=True))"
   # None
   ```
   
   There is no `relax.op` FFT primitive either:
   
   ```bash
   grep -rn "def fft\|def rfft\|def dft" python/tvm/relax/op/ --include="*.py"
   # empty
   ```
   
   `call_dps_packed("topi.signal.dft", ...)` therefore fails at runtime and 
there
   is nothing in `relax.op` to compose with.
   
   ### This issue is to track progress for FEATURE NAME
   - [ ] [TOPI][Signal][Relax] Add native rfft2d op with C++ registered backend
   
   
   ### Proposed work
   
   - Add `rfft2d` to `src/topi/signal.cc` with a `TVM_REGISTER_GLOBAL` entry
   - Add a legalization rule in `python/tvm/relax/transform/legalize_ops/`
   - Expose as `relax.op.signal.rfft2d`
   - Update the TFLite frontend `convert_rfft2d` handler to route through it
   - Add unit and E2E tests
   
   
   ### References
   
   - Tracking issue for remaining TFLite ops: #19519
   - TFLite frontend: `python/tvm/relax/frontend/tflite/tflite_frontend.py`
   - Existing pure-Python TE implementation to build from: 
`python/tvm/topi/signal.py`
   


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