-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong results for inverse transformation for 2D batches #273
Comments
The example with hipPlanMany works i.e. if one calculates the inverse with the same plan settings, the error is small. Changing the sample as follows results in a wrong result.
|
It looks like you're changing a lot of the parameters; some combinations don't make sense, and can't produce correct results. Could you write down the input and output strides and distances along with your problem size, please? |
Sure. I am only trying complex transforms and thus input and outputs strides are equal. |
Is the transform in-place or out-of-place? Just want to make sure it's not a duplicate of #270 |
The transformation is in-place and the forward transform seems to be giving correct results. |
So, one thing that might be causing confusion is that hipFFT is row-major ("C-style) and rocFFT is column-major ("FORTRAN-style"). So a hipFFT transform has lengths {nx, ny}, and the equivalent rocFFT transform has lengths {ny, nx}. The strides also have to be reversed. This may explain why hipFFT is working but rocFFT isn't. |
Sorry, if my 2nd comment was confusing, but both are not working. To clarify: For |
Thanks for the info; I am making some time to look into this issue. This may be solved by a commit that is under review. Could you try https://github.com/malcolmroberts/rocFFT/tree/fix_transpose_for_1D_stride and see if this solves your problem? |
Closing due to inactivity. |
What is the expected behavior
What actually happens
If I transform a 4x4x4 array, where the transformation should be applied to the 2. and 3. dimension, the forward transformation is correct but the inverse is not.
I have the following parameters for rocfft_plan_description:
strides = {4, 16} and distance = 1. Are these correct or am I missing something?
However, applying the transformations to first and second dimension (with strides={1,4} and distance=16) works.
How to reproduce
Maximum error: 9.13869
but should be close to 0.Environment
Used the rocm docker image with kernel v5.3.12.
The text was updated successfully, but these errors were encountered: