We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
add_constant!(::LoopSet, ::Val{2}, ::Int)
The presence of @fastmath here appears to cause a problem. In practice I can of course remove fastmath, but opening the issue just in case
@fastmath
function f3(x::Vector{T},t) where T @turbo for i = 1:length(x) xv = x[i] @fastmath x[i] = 1/(xv^2) end x end
LoadError: MethodError: no method matching add_constant!(::LoopVectorization.LoopSet, ::Val{2}, ::Int64) Closest candidates are: add_constant!(::LoopVectorization.LoopSet, ::Number, ::Int64) at ~/.julia/packages/LoopVectorization/lCUVJ/src/parse/add_constants.jl:37 add_constant!(::LoopVectorization.LoopSet, ::Number, ::Int64, ::Any) at ~/.julia/packages/LoopVectorization/lCUVJ/src/parse/add_constants.jl:37 add_constant!(::LoopVectorization.LoopSet, ::Symbol, ::Int64) at ~/.julia/packages/LoopVectorization/lCUVJ/src/parse/add_constants.jl:14 ... Stacktrace: [1] add_parent!(vparents::Vector{LoopVectorization.Operation}, deps::Vector{Symbol}, reduceddeps::Vector{Symbol}, ls::LoopVectorization.LoopSet, var::Val{2}, elementbytes::Int64, position::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/parse/add_compute.jl:94 [2] add_compute!(ls::LoopVectorization.LoopSet, var::Symbol, ex::Expr, elementbytes::Int64, position::Int64, mpref::Nothing) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/parse/add_compute.jl:498 [3] add_compute!(ls::LoopVectorization.LoopSet, var::Symbol, ex::Expr, elementbytes::Int64, position::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/parse/add_compute.jl:454 [4] add_operation!(ls::LoopVectorization.LoopSet, LHS::Symbol, RHS::Expr, elementbytes::Int64, position::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/modeling/graphs.jl:1409 [5] add_parent!(vparents::Vector{LoopVectorization.Operation}, deps::Vector{Symbol}, reduceddeps::Vector{Symbol}, ls::LoopVectorization.LoopSet, var::Expr, elementbytes::Int64, position::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/parse/add_compute.jl:92 [6] add_compute!(ls::LoopVectorization.LoopSet, var::Symbol, ex::Expr, elementbytes::Int64, position::Int64, mpref::LoopVectorization.ArrayReferenceMetaPosition) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/parse/add_compute.jl:492 [7] add_operation!(ls::LoopVectorization.LoopSet, LHS_sym::Symbol, RHS::Expr, LHS_ref::LoopVectorization.ArrayReferenceMetaPosition, elementbytes::Int64, position::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/modeling/graphs.jl:1467 [8] prepare_rhs_for_storage!(ls::LoopVectorization.LoopSet, RHS::Expr, array::Symbol, rawindices::SubArray{Any, 1, Vector{Any}, Tuple{UnitRange{Int64}}, true}, elementbytes::Int64, position::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/modeling/graphs.jl:1500 [9] add_assignment!(ls::LoopVectorization.LoopSet, LHS::Expr, RHS::Expr, elementbytes::Int64, position::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/modeling/graphs.jl:1585 [10] push!(ls::LoopVectorization.LoopSet, ex::Expr, elementbytes::Int64, position::Int64, mpref::Nothing) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/modeling/graphs.jl:1627 [11] push!(ls::LoopVectorization.LoopSet, ex::Expr, elementbytes::Int64, position::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/modeling/graphs.jl:1611 [12] add_block! @ ~/.julia/packages/LoopVectorization/lCUVJ/src/modeling/graphs.jl:921 [inlined] [13] add_loop!(ls::LoopVectorization.LoopSet, q::Expr, elementbytes::Int64) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/modeling/graphs.jl:1258 [14] copyto! @ ~/.julia/packages/LoopVectorization/lCUVJ/src/constructors.jl:15 [inlined] [15] LoopVectorization.LoopSet(q::Expr, mod::Symbol) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/constructors.jl:84 [16] LoopVectorization.LoopSet(q::Expr, m::Module) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/constructors.jl:88 [17] turbo_macro(::Module, ::LineNumberNode, ::Expr) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/constructors.jl:227 [18] var"@turbo"(__source__::LineNumberNode, __module__::Module, args::Vararg{Any}) @ LoopVectorization ~/.julia/packages/LoopVectorization/lCUVJ/src/constructors.jl:330 [19] eval @ ./boot.jl:368 [inlined] [20] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String) @ Base ./loading.jl:1428 [21] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Base ./essentials.jl:729 [22] invokelatest(::Any, ::Any, ::Vararg{Any}) @ Base ./essentials.jl:726 [23] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool) @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.12/scripts/packages/VSCodeServer/src/eval.jl:233 [24] (::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})() @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.12/scripts/packages/VSCodeServer/src/eval.jl:157 [25] withpath(f::VSCodeServer.var"#66#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String) @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.12/scripts/packages/VSCodeServer/src/repl.jl:249 [26] (::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})() @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.12/scripts/packages/VSCodeServer/src/eval.jl:155 [27] hideprompt(f::VSCodeServer.var"#65#69"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}) @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.12/scripts/packages/VSCodeServer/src/repl.jl:38 [28] (::VSCodeServer.var"#64#68"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})() @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.12/scripts/packages/VSCodeServer/src/eval.jl:126 [29] with_logstate(f::Function, logstate::Any) @ Base.CoreLogging ./logging.jl:511 [30] with_logger @ ./logging.jl:623 [inlined] [31] (::VSCodeServer.var"#63#67"{VSCodeServer.ReplRunCodeRequestParams})() @ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.7.12/scripts/packages/VSCodeServer/src/eval.jl:225 [32] #invokelatest#2 @ ./essentials.jl:729 [inlined] [33] invokelatest(::Any) @ Base ./essentials.jl:726 [34] macro expansion @ ~/.vscode/extensions/julialang.language-julia-1.7.12/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined] [35] (::VSCodeServer.var"#61#62")() @ VSCodeServer ./task.jl:484 in expression starting at /tmp/tt.jl:58 in expression starting at /tmp/tt.jl:57
The text was updated successfully, but these errors were encountered:
2ada0e8
Thanks for the issue, it should now be fixed and tested.
FWIW, @fastmath probably won't change anything LV is currently doing (but it'll be relevant after the rewrite).
Sorry, something went wrong.
No branches or pull requests
The presence of
@fastmath
here appears to cause a problem. In practice I can of course remove fastmath, but opening the issue just in caseThe text was updated successfully, but these errors were encountered: