Tullio.jl
Tullio.jl copied to clipboard
Reporting a bug when Tullio being included with LoopVectorization
In this simple example, if just including Tullio, everythings works well.
using Tullio,BenchmarkTools
t=collect(range(start=-3,step=0.01,stop=3));
nb(e)::Float64=inv(expm1(e/1e-4))
@btime @tullio test1[n]:=nb(t[n])
1.800 μs (1 allocation: 4.88 KiB)
601-element Vector{Float64}:
However if I include LoopVectorization
and TensorCast
next:
using LoopVectorization,TensorCast
@btime @tullio test2[n]:=nb(t[n])
7.850 μs (49 allocations: 7.62 KiB)
┌ Warning: #= C:\Users\.julia\packages\Tullio\NGyNM\src\macro.jl:1093 =#:
│ `LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead.
│ Use `warn_check_args=false`, e.g. `@turbo warn_check_args=false ...`, to disable this warning.
└ @ Main C:\Users\.julia\packages\LoopVectorization\FMfT8\src\condense_loopset.jl:1049
601-element Vector{Float64}:
After I several times tries, I found this error is related with function type declear. When I define function, no matter declear argument type of return type, with the coexistence with LoopVectorization
and TensorCast
, LoopVectorization
would throw this error.