Skip to content
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

The Z2D interface of vkfft is quite different from the result of fftw. #133

Open
zhaohaifei opened this issue Sep 4, 2023 · 1 comment

Comments

@zhaohaifei
Copy link

I want to call Z2D to calculate the fft of multiple batches. Is there any problem with this call? Why is the result so different from fftw? Also, I'm using version 1.2.12.

VkFFTConfiguration configuration = {};
VkFFTApplication app_outplace = {};

hipDevice_t device;
uint64_t bufferSize = 0;
uint64_t inputbufferSize = 0;

...

configuration.device = &plan->device;
configuration.FFTdim = 1;
configuration.size[0] = 3;
configuration.numberBatches = 4;
configuration.bufferNum = 1;
configuration.inputBufferNum = 1;

configuration.inputBufferStride[dim - 1] = xxx;
configuration.bufferStride[dim - 1] = xxx;

configuration.inputbufferSize = xxx;
configuration.bufferSize = xxx;

configuration.doublePrecision = true;
configuration.performR2C = true;
configuration.inverseReturnToInputBuffer = true;

configuration.isInputFormatted = true;
VkFFTResult fftResult = initializeVkFFT(&plan->app_outplace, plan->configuration);

VkFFTLaunchParams launchParams = {};
launchParams.inputBuffer = (void**)&odata;
launchParams.buffer = (void**)&idata;

VkFFTResult resVkFFT = VKFFT_SUCCESS;
resVkFFT = VkFFTAppend(&plan->app_outplace, 1, &launchParams);

@DTolm
Copy link
Owner

DTolm commented Sep 4, 2023

Hello,

can you post the full code of FFTW initialization and the full code of VkFFT initialization? It is impossible to judge what is wrong otherwise.

Best regards,
Dmitrii

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants