-
Notifications
You must be signed in to change notification settings - Fork 29
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
Possible wrong error detection #184
Comments
Guess SIMD is required to be loaded to reproduce this ? |
Unfortunately, this is expected -- julia> methods(≠, (Any, Int,))
# 3 methods for generic function "!=":
[1] !=(x::Vec{N, T}, y::T2) where {N, T2<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}, T<:Union{Float32, Float64}} in SIMD at /Users/aviatesk/.julia/packages/SIMD/x4UOS/src/simdvec.jl:398
[2] !=(x::Vec{N, T}, y::T2) where {N, T2<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}, T<:Union{Bool, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}} in SIMD at /Users/aviatesk/.julia/packages/SIMD/x4UOS/src/simdvec.jl:398
[3] !=(x, y) in Base at operators.jl:278 In order to improve the inference accuracy, Julia's abstract interpretation tries to infer all the matching methods when the # of the matches are not so many (heuristically this is set to 3 by default, but we can configure it with julia> report_call((Any,); max_methods=2) do a
a ≠ 0
end
No errors !
Any Well, as explained above, inference will give up when there are too many of them in order to obtain analysis performance, and otherwise inference will never terminate in practical time, e.g. consider inferring all the matching methods for |
Perhaps it makes sense to special case The issue is that it's not very useful output to get. Sure, I guess the real issue is that complete type instability (e.g. inference to |
MWE:
The function it "detects" is:
My question is: Isn't it a bug that something that is inferred as
x::Any != y::Int64
hits this method?The text was updated successfully, but these errors were encountered: