I’m using JET.jl
with my code. It is giving me an error with a function, but I don’t really understand why. For a vector x
(e.g. x = -.3 .+ rand(10)
), I have a simple one-liner, vmapreduce(abs, max, x)
, which calculates the maximum absolute value in x
. (vmapreduce
is in LoopVectorization.jl
.) However, report_call
identifies an error.
julia> @report_call vmapreduce(abs, max, x)
═════ 1 possible error found ═════
┌ vmapreduce(::typeof(abs), ::typeof(max), ::Vector{Float64}) @ LoopVectorization /home/xxxxx/.julia/packages/LoopVectorization/tIJUA/src/simdfunctionals/mapreduce.jl:73
│┌ _vmapreduce(f::typeof(abs), op::typeof(max), ::StaticInt{4}, N::Int64, ::Type{Float64}, args::Vector{Float64}) @ LoopVectorization /home/xxxxx/.julia/packages/LoopVectorization/tIJUA/src/simdfunctionals/mapreduce.jl:88
││┌ materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(vload), <:Tuple{Tuple{LayoutPointers.StridedPointer{Float64, 1, 1, 0, _A, Tuple{StaticInt{8}}, Tuple{StaticInt{0}}} where _A}, Tuple{Unroll{1, 4, 4, 1, 4, 0x0000000000000000, 1, Tuple{StaticInt{0}}}}}}) @ Base.Broadcast ./broadcast.jl:903
│││┌ copy(bc::Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(vload), <:Tuple{Tuple{LayoutPointers.StridedPointer{Float64, 1, 1, 0, _A, Tuple{StaticInt{8}}, Tuple{StaticInt{0}}} where _A}, Tuple{Unroll{1, 4, 4, 1, 4, 0x0000000000000000, 1, Tuple{StaticInt{0}}}}}}) @ Base.Broadcast ./broadcast.jl:1118
││││┌ ntuple(f::Base.Broadcast.var"#31#32"{Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(vload), var"#s178"}} where var"#s178"<:Tuple{Tuple{LayoutPointers.StridedPointer{Float64, 1, 1, 0, _A, Tuple{StaticInt{8}}, Tuple{StaticInt{0}}} where _A}, Tuple{Unroll{1, 4, 4, 1, 4, 0x0000000000000000, 1, Tuple{StaticInt{0}}}}}, ::Val{1}) @ Base ./ntuple.jl:48
│││││┌ (::Base.Broadcast.var"#31#32"{Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(vload), var"#s178"}} where var"#s178"<:Tuple{Tuple{LayoutPointers.StridedPointer{Float64, 1, 1, 0, _A, Tuple{StaticInt{8}}, Tuple{StaticInt{0}}} where _A}, Tuple{Unroll{1, 4, 4, 1, 4, 0x0000000000000000, 1, Tuple{StaticInt{0}}}}})(k::Int64) @ Base.Broadcast ./broadcast.jl:1118
││││││┌ _broadcast_getindex(bc::Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(vload), Union{}}, I::Int64) @ Base.Broadcast ./broadcast.jl:700
│││││││┌ getproperty(x::Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(vload), Union{}}, f::Symbol) @ Base ./Base.jl:37
││││││││ invalid builtin function call: Base.getfield(x::Base.Broadcast.Broadcasted{Base.Broadcast.Style{Tuple}, Nothing, typeof(vload), Union{}}, f::Symbol)
│││││││└────────────────────