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

copying of CUDA Plan does not work #118

Open
roflmaostc opened this issue Apr 12, 2023 · 2 comments
Open

copying of CUDA Plan does not work #118

roflmaostc opened this issue Apr 12, 2023 · 2 comments

Comments

@roflmaostc
Copy link

Sorry for spamming 😆

But copy of a CUDA plan does not work:

	p = NFFT.plan_nfft(coords, (size(x,1), size(x,2)))

MethodError: no method matching copy(::CuNFFT.CuNFFTPlan{Float32, 2})

Closest candidates are:

copy(!Matched::LinearAlgebra.Hessenberg{<:Any, <:LinearAlgebra.UpperHessenberg}) at ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/LinearAlgebra/src/hessenberg.jl:419

copy(!Matched::LinearAlgebra.Hessenberg{<:Any, <:LinearAlgebra.SymTridiagonal}) at ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/LinearAlgebra/src/hessenberg.jl:420

copy(!Matched::LinearAlgebra.Cholesky) at ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/LinearAlgebra/src/cholesky.jl:511

...

    (::Main.var"workspace#17".var"#1#2"{CuNFFT.CuNFFTPlan{Float32, 2}})(::Int64)@none:0
    [email protected]:47[inlined]
    [email protected]:787[inlined]
    f_cuda@[Other: 3](http://localhost:1234/edit?id=96cda76c-d92d-11ed-0c54-bb1f68c531e4#)[inlined]
    top-level scope@[Local: 1](http://localhost:1234/edit?id=96cda76c-d92d-11ed-0c54-bb1f68c531e4#)[inlined]
@tknopp
Copy link
Member

tknopp commented Apr 12, 2023

While technically implementing this should be straight forward, I don't think this will work as you hope. Different CuNFFTPlan will not execute in parallel on the GPU. So a threaded for loop will not speed up anything.

@roflmaostc
Copy link
Author

Yeah I wanted to give a shot with KernelAbstractions. Surprisingly that worked with Interpolations pretty well, hence I wanted to give it a try.

But yes, looks like it is not working.

So at the moment my plan is not quite working, is it?

What is your general impression of the CUDA performance? 10x faster for big arrays?

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