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

rCuFFTPlan not defined #2509

Open
BoundaryValueProblems opened this issue Sep 27, 2024 · 1 comment
Open

rCuFFTPlan not defined #2509

BoundaryValueProblems opened this issue Sep 27, 2024 · 1 comment
Labels
needs information Further information is requested

Comments

@BoundaryValueProblems
Copy link

The following line was working previously at version 5.4.3.. However, with v5.5.2, it fails to precompile:

function CUDA.cu(P::FFTW.rFFTWPlan)
    return plan_rfft(cu(zeros(real(eltype(P)), P.sz)), P.region)
end
CUDA.cu(P::CUFFT.rCuFFTPlan) = P

The above generates the error: rCuFFTPlan not defined.

For v5.4.3 and earlier, we had to do the above since CUDA.cu did not accept FFTW.rFFTWPlan. For v5.5.2, does it accept FFTW.rFFTWPlan directly so that the above conversion function is not necessary anymore?
Thanks a lot for your help!

@BoundaryValueProblems BoundaryValueProblems added the bug Something isn't working label Sep 27, 2024
@maleadt
Copy link
Member

maleadt commented Sep 27, 2024

CUDA.cu(P::CUFFT.rCuFFTPlan) = P

That's doing both type piracy (you shouldn't extend the cu function, as mentioned in the docstring, and definitely not on types you do not own), while using internal types that are not guaranteed to be stable. CUFFT.rCuFFTPlan was removed in https://github.com/JuliaGPU/CUDA.jl/pull/2430/files because of switching to the new unified Xt interface; can you look at the changes in that PR to see if they fit your use case?

And for future reference: Instead of carrying code like that, it's better to open a PR to fix the underlying problem, or at the very least open an issue so that somebody else can work on it.

@maleadt maleadt added needs information Further information is requested and removed bug Something isn't working labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs information Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants