You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by "fnhirwa (via GitHub)" <gi...@apache.org> on 2026/06/16 18:25:09 UTC

Re: [PR] [Relax][Frontend][TFLite] Add support for FFT/complex operators: REAL, IMAG, COMPLEX_ABS [tvm]

fnhirwa commented on PR #19763:
URL: https://github.com/apache/tvm/pull/19763#issuecomment-4721994733

   Thanks for the feedback.
   
   **Double lowering fix**: Removed the `complex64 -> float32[..., 2]` transformation from `_input_type()`. The lowering now happens exactly once in `from_tflite()` after user overrides are merged. Verified that `shape_dict` and `dtype_dict` overrides no longer produce double-packed shapes.
   
   **Constant tensor support**: Added `COMPLEX64` to `get_tensor_type_as_numpy`, `get_tensor_type_str`, and `get_tensor_expr`. Constant complex tensors are now reinterpreted as `float32[..., 2]` by reading the buffer as `np.complex64` and calling `.view(np.float32).reshape(shape + (2,))`.
   
   **RFFT2D**: Removed from this PR entirely. An O(N²) matmul decomposition using existing Relax ops (`matmul`, `permute_dims`, `concat`) is feasible as an interim implementation and will be contributed in a follow-up PR. The correct long-term fix is a native `relax.op.signal.rfft2d` with a C++ registered backend, tracked in #19764.


-- 
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: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org