# Help understanding JET.jl output

**URL:** https://discourse.julialang.org/t/help-understanding-jet-jl-output/116788
**Category:** General Usage
**Tags:** question, loopvectorization, jet
**Created:** [July 8, 2024, 8:35pm UTC](https://discourse.julialang.org/t/help-understanding-jet-jl-output/116788 "2024-07-08T20:35:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![james3](https://avatars.discourse-cdn.com/v4/letter/j/b5e925/32.png) [@james3](https://discourse.julialang.org/u/james3)
#### Post date: [July 8, 2024, 8:35pm UTC](https://discourse.julialang.org/t/help-understanding-jet-jl-output/116788/1 "2024-07-08T20:35:58Z")

</div>

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
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)
│││││││└────────────────────

```

---

<div class="post-metadata">

### Author: ![filchristou](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/filchristou/32/26760_2.png) [@filchristou](https://discourse.julialang.org/u/filchristou)
#### Post date: [July 9, 2024, 2:47pm UTC](https://discourse.julialang.org/t/help-understanding-jet-jl-output/116788/2 "2024-07-09T14:47:57Z")

</div>

Not sure about the specifics of the problem here. Just wanted to say that sometimes it is sane to use [`target_modules`](https://aviatesk.github.io/JET.jl/dev/config/#result-config) to limit the analysis scope to the modules you have written. JET.jl often finds possible errors in modules that an end user can do very little about.
