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

Inference failure in brfft on 0.7 #25

Open
ararslan opened this issue Jul 18, 2017 · 4 comments
Open

Inference failure in brfft on 0.7 #25

ararslan opened this issue Jul 18, 2017 · 4 comments

Comments

@ararslan
Copy link
Member

From the Travis log (also seeing locally):

ERROR: LoadError: return type Array{Float64,2} does not match inferred return type Any
Stacktrace
 [1] macro expansion at /home/travis/.julia/v0.7/FFTW/test/runtests.jl:335 [inlined]
 [2] anonymous at ./<missing>:?
 [3] include_relative(::Module, ::String) at ./loading.jl:464
 [4] include(::Module, ::String) at ./sysimg.jl:14
 [5] process_options(::Base.JLOptions) at ./client.jl:315
 [6] _start() at ./client.jl:383
while loading /home/travis/.julia/v0.7/FFTW/test/runtests.jl, in expression starting on line 331

The line that's being hit is equivalent to @inferred brfft(randn(10), 18). Oddly enough, running that from the REPL works fine for me.

@ararslan
Copy link
Member Author

My bad, I can reproduce this at the REPL; I had the trigger of the error wrong. The code is

@inferred brfft(randn(10, 12), 18)

It's the 2-dimensional input case that can't be inferred.

@ararslan
Copy link
Member Author

Checking out aa/dft on AbstractFFTs, aa/ugh-oh-my-god on FFTW, current Julia master:

julia> using FFTW, AbstractFFTs, Base.Test

julia> x = randn(10, 12);

julia> @inferred brfft(x, 18);
ERROR: return type Array{Float64,2} does not match inferred return type Any
Stacktrace:
 [1] error(::String) at ./error.jl:28

julia> @inferred brfft(AbstractFFTs.complexfloat(x), 18);

The interesting thing about this is that brfft(x, d) calls brfft(complexfloat(x), d), and the latter is inferred correctly while the former is not.

@ararslan
Copy link
Member Author

I've been talking with @JeffBezanson about this a bit but I'm having difficulty putting together a reduced reproducible case. Do you have any insight on this, @stevengj?

@ararslan
Copy link
Member Author

I haven't been able to figure this out nor isolate it further, so if anyone could lend a hand or provide some insight, that would be very much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant