Closed mkstoyanov closed 1 year ago
@vmontanaro can you take a look at this PR. What is happening is that the output of fotward
matches between CUDA and FFTW, which is exactly what we wanted. Unfortunately, the output of backward
does not.
With the correct scaling, forward + backwards gets back where we started, but taking backward
by itself will change the result. The trick is here:
Ideally, we want the scaling factor to depend only on the type of the transform (c2c, cos, sin, cos1, sin1, etc), but not the backend (CUDA or FFTW).
Do you think this is doable and how much effort would it be. I know you have experience with the indexing and you mentioned that it can be tricky.
I will have a look at the master now that the commit is merged. Probably we will need to add another layer of abstraction for the back end and transform type, which is definetly doable, but might take a bit to be planned so that the whole system doesn't change...
Maybe we can just add the scaling step in the last post-processing kernel for the backward transform. The overhead will be negligible and it will ensure identical output.
On a different note, some of your commits show as @vmontanaro and some show with just your name. This usually happens when you sign commits with different email on different machines, laptop/desktop/cluster. You should make sure that all places where you use git have one of your emails and all of the email that you're using are registered in github. That allows github to collect analytics and give you proper credit for your contributions. Right now, you don't show up on the Insight page under "contributors" and you should be there.
r2r