-
Notifications
You must be signed in to change notification settings - Fork 82
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
Segmentation Fault in computing 1D FFT for different random sizes of arrays. #224
Comments
Pranay emailed me personally as well to report this issue. I am trying locally to see if I can recreate the problem. |
This may have been fixed in PR 222; which is commit 923339e . Could you check that an up-to-date develop branch resolves this issue? |
I can reproduce the segfault with rocfft v0.9.4.0. @malcolmroberts I will check with your commit hash. |
For reproduction, this didn't show up with the rocm 2.6 compiler; the first time that this showed up was with 2.7, and possibly also with hip-clang. |
Hmmm, I still get a segfault with 923339e. Are you saying that I also need to use a newer compiler too? I'm using hip_hcc v1.5.19255 from the radeon repository. |
Oops, I meant 'older', not 'newer'. |
@dmcdougall : PR202 dealt with an memory issue with compilers in 2.7; this issue didn't show up with the 2.6 compilers. You might need the 2.7 compilers in order to generate a segfault, assuming that this is the same issue. Sounds like this isn't a problem that you are having when trying to reproduce the issue. One thing to check is if you have rocFFT already installed, then the HIP compilers will look first on /opt/rocm/... when linking (even if you do not add this to LD_LIBRARY_PATH). So one must remove all rocFFT libs in /opt/rocm, either by just deleting them or via package manager. One can check which versions are being used by looking at the output of "ldd gpuCuda". |
With ROCm 2.6 and a custom build of rocfft (the tip of
Yep. I discovered that the hard way :)
That's exactly what I did. |
Thanks for checking the linking; looks like this isn't caused by the issue resolved by PR202. I've been able to reproduce this issue on my local machine using the latest version. I think that the problem is due to the fact that transforms for general sizes must be performed using the Bluestein algorithm, and this requires extra work memory. We use this method when the problem size is not composed of factors of 2, 3, and 5. When we use Bluestein and the work memory is not passed to rocfft_execute via a rocfft_execution_info structure, the program segfaults. When one passes the work memory, execution succeeds. A working example for this can be found in docs/samples/complex_1d.cpp . I'll look into improving the documentation and providing the user with better feedback about work memory. Please let me know if this resolves the issue. |
@malcolmroberts Thank you for your suggestions. I will try to use rocfft_execution_info and pass the info to rocfft_execute. Will update in the comments if this resolves the issue or not. |
@malcolmroberts @dmcdougall The use of work memory via a rocfft_execution_info has resolved the segfault. I am able to execute the code and obtain expected results for any size of the array. Thanks! |
Good to hear! We'll work on improving the interface and documentation so that this is easier to get working. |
Code
README.md
of theROCmSoftwarePlatform/rocFFT
at https://github.com/ROCmSoftwarePlatform/rocFFT.What is the expected behavior
N
in the code).What actually happens
N
and produce segmentation fault for other values ofN
. Below is the error information from the gdb.How to reproduce
README.md
of the link https://github.com/ROCmSoftwarePlatform/rocFFT and change the values ofN
. The code works as expected forN
value of 16, 20, 25 and many more. And the code producessegmentation fault
forN
value of 21, 22, 23 and many more.Hardware and library versions
Compilation and execution commands
Comments
The text was updated successfully, but these errors were encountered: