-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix up type inference and other issues for the new DFT API #12202
Conversation
Looks good, thanks for working on this; sorry it's taken me so long to get back to you on this. |
Fix up type inference and other issues for the new DFT API
I'm also trying to implement some other tweaks that I think can probably make this more compiler/type inference friendly. I guess I'll just do a separate PR when I'm ready. |
Sorry, it looked ready to merge to me. |
With the latest version it seems there is still a little allocation:
gives |
the |
In global scope |
julia> function f()
A = rand(Complex128, 300,300,50);
X = similar(A)
p = plan_fft(A)
@time A_mul_B!(X, p, A);
@time A_mul_B!(X, p, A);
end
f (generic function with 1 method)
julia> f();
119.674 milliseconds
105.739 milliseconds |
Ah, right. (cc: @HomerReid) |
The type instability/inference issue is mentioned in #12087 (comment) and #12087 (comment).
The code can probably be cleaned up a little to make the type inference more effective without the type assertion but the current version should be good enough.
This also fixes a deprecation warning for
int64
.Close #9772
CC. @stevengj