You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature functionality
Provide routines for Fast Fourier Transform (FFT) and its inverse for $n$-dimensional DNDarray's. Fourier transform along a single axis, a prescribed subset of axes, or along all axes should be possible. This would correspond roughly to the functionality of the fft-module in PyTorch:
fftn/ifftn: FFT/iFFT of an $n$-dim array along up to $n$ axes
fft/ifft: FFT/iFFT of an $n$-dim array along a single axis only
fft2/ifft2: FFT/iFFT of an $n$-dim array along two axes only
the same with r...: modifications in the case of real-valued input arrays
the same with h...: modifications in the case of hermitian input arrays
arXiv:1804.09536 may serve as an overview on $n$-dimensional FFT. Heat's data distribution is referred to as "slab decomposition", so actually we will do something much more easy than described in this paper.
Suggestions and Hints
The discrete Fourier transform $\mathcal{F}$ of an $n$-dimensional array is given by $\mathcal{F}=\mathcal{F}{0}\circ... \circ\mathcal{F}{d-1}$ where $\mathcal{F}_i$ denotes the 1-dimensional (i.e. usual) DFT along the $i$-th axis. Consequently, a similar factorization holds true for the inverse DFT as well.
The "only" tricky part when adding parallelization to this concept is the Fourier transformation along the split-axis. I would like to recommend something like the following approach:
do locally on each process: FFT along all axes $i$ such that $i \in dim$ and $i\neq split$ (use the respective PyTorch function). If $split \notin dim$ we are done.
If $split \in dim$ now resplit the array to a different split axis.
do locally on each process: FFT (1-dimensional, PyTorch) along axis $split$ (the original split axis, of course, which is currently no more the split axis...)
resplit back to obtain same split-axis as at the beginning
Similarly, also the inverse FFT (iFFT) can be implemented. Of course, this is just a very first idea, how FFT and iFFT could be implemented in Heat; if you have a good idea for a more elaborate, more efficient implementation, feel free to tell me :)
Since PyTorch-FFT already supports CPU and GPU, the corresponding implementation in Heat should work on CPU und GPU without particular additional effort.
The text was updated successfully, but these errors were encountered:
Feature functionality$n$ -dimensional
Provide routines for Fast Fourier Transform (FFT) and its inverse for
DNDarray
's. Fourier transform along a single axis, a prescribed subset of axes, or along all axes should be possible. This would correspond roughly to the functionality of thefft
-module in PyTorch:fftn
/ifftn
: FFT/iFFT of anfft
/ifft
: FFT/iFFT of anfft2
/ifft2
: FFT/iFFT of anr...
: modifications in the case of real-valued input arraysh...
: modifications in the case of hermitian input arraysCan potentially be used for convolutions (#1248 )
Material
Suggestions and Hints$\mathcal{F}$ of an $n$ -dimensional array is given by $\mathcal{F}=\mathcal{F}{0}\circ... \circ\mathcal{F}{d-1}$ where $\mathcal{F}_i$ denotes the 1-dimensional (i.e. usual) DFT along the $i$ -th axis. Consequently, a similar factorization holds true for the inverse DFT as well.
The discrete Fourier transform
The "only" tricky part when adding parallelization to this concept is the Fourier transformation along the split-axis. I would like to recommend something like the following approach:
Similarly, also the inverse FFT (iFFT) can be implemented. Of course, this is just a very first idea, how FFT and iFFT could be implemented in Heat; if you have a good idea for a more elaborate, more efficient implementation, feel free to tell me :)
Since PyTorch-FFT already supports CPU and GPU, the corresponding implementation in Heat should work on CPU und GPU without particular additional effort.
The text was updated successfully, but these errors were encountered: