-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fast Legendre Transform #206
Comments
Yep! I just need to go through the process of creating new binaries for https://github.com/MikaelSlevinsky/FastTransforms/releases/tag/v0.6.3 |
Let's see how this goes JuliaPackaging/Yggdrasil#9359 |
Looks like the binaries are cooked! Just waiting for the merge, then we can work on the Julia-side of things |
Amazing, thank you @MikaelSlevinsky! |
So, I've got a simple prototype built in this PR (JuliaApproximation/FastTransforms.jl#251) for using the new code, but there must be some overhead somewhere in your code above. Using the current julia> using FastTransforms
julia> c = randn(2000, 1000);
julia> p = plan_leg2cheb(c);
julia> @time p*c; # 18 cores
0.058025 seconds (2 allocations: 15.259 MiB)
julia> FastTransforms.ft_set_num_threads(1)
julia> @time p*c; # 1 core
1.141138 seconds (2 allocations: 15.259 MiB, 12.43% gc time)
|
Yes the overhead seems to come from the choice of algorithm for
The Looking at What's the default algorithm for |
I used th only because the old plans had bad complexity, now that’s fixed we should switch to the default it uses h-matrices/ FMM I think |
Ok! so as far as I can tell |
What's the history with plan_cheb2leg? When did it change from bad to good complexity? |
Yesterday? |
We could do this in Julia by just looping over the columns etc. |
That would be |
What’s your p? If it’s low it’ll be faster try p = 1 million |
Yeah I had |
Right. So the choice was made for 1D adaptive transforms where one would need lots of plans. |
@dlfivefifty
The performance of Legendre's
plan_transform
sometimes seems to degrade once the number of grid points becomes large. In particular I noticed that:Synthesis
\
is slower than analysis*
. After some profiling @dlfivefifty noticed thatplan_th_leg2cheb!
inFastTransforms
is being called during the run of synthesis. This is likely the cause.Sometimes bundling multiple transforms together is not faster than running the transform sequentially in a for loop. Some of this is probably attributed to the call to
plan_th_leg2cheb!
in the synthesis but this behaviour also occurs during analysis. E.g.And the effect is worse in 2D (as the size of the arrays increase)
@MikaelSlevinsky Is the Legendre transform in FastTransforms going to change or is it currently stable?
The text was updated successfully, but these errors were encountered: