Closed amisal88 closed 7 years ago
@amisal88 I believe the current framework won't work for FFT. The reason is that the current implementation can only generate a streaming hardware pipeline, more specifically a line buffered pipeline (see the paper at https://arxiv.org/abs/1610.09405 for more details). However, it is hard to map a FFT to such a pipeline architecture. I apologize that the error information wasn't clear to illustrate this limitation.
@jingpu Thank you very much for the clarification.
Hi @jingpu
I am trying to implement 2D FFT in Halide-HLS.
My first approach is using the Halide FFT (provided in apps/fft) even though it is in floating point format. At first I am going to use 1D FFT, so I write a function named as "My_fft2d_r2c" which is basically the first parts of "fft2d_r2c" function of halide fft in "fft.cpp" file. The "My_fft2d_r2c" function is attached below.
I changed all expressions of "target.natural_vector_size()" to 1. Also the following scheduling is removed from the last lines of "fft_dim1" function in "fft.cpp" file.
Also my ''pipeline.cpp'' is attached below. Since ".accelerate" method acts on funcs only (NOT complex funcs) "re()" operator is used for "hw_output()" (because of an error complaining about Stream size).
The PROBLEM is: When I run "make pipeline_hls.cpp", Halide-HLS reports an error like this:
Which I believe causes from this line of code in "fft_dim1" function:
So if I try to bypass the error somehow, using following change to that line:
it reports another error like this
It reports that error even though the extent of yi is specified in the tile command:
Can you please help me with this? Thanks!
Attachments:
Attachment No.1: Definition of "My_fft2d_r2c" function: (which is basically the first parts of "fft2d_r2c" function of halide fft in "fft.cpp" file)
Attachment No.2: The content of "pipeline.cpp" file: