-
Notifications
You must be signed in to change notification settings - Fork 68
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
Reduction not found #528
Comments
Here is a variant born out of this MWE with a different goal to produce another unexpected error.
gives For this example, both dimensions of
But it gives the error |
A more general question is, I feel that sometimes writing code in a mathematically equivalent way will makes a working code no longer works if I use @turbo. This makes me feel worried whether my working code actually has some underlying bug / is not doing what it is supposed to do. In general, do you think that the errors LV give are because of subtleties of making everything SIMD (like LV now cannot transform codes if they are written in an unnecessarily complicated way), or because of essential problem in the original code? |
Hi, here is a MWE of an unexpected error:
LoadError: LoadError: "Reduction not found."
Stacktrace:
[1] reduction_zero
@ $HOME.julia\packages\LoopVectorization\7gWfp\src\modeling\costs.jl:649 [inlined]
[2] add_reduction_update_parent!(vparents::Vector{LoopVectorization.Operation}, deps::Vector{Symbol}, reduceddeps::Vector{Symbol}, ls::LoopVectorization.LoopSet, parent::LoopVectorization.Operation, instr::LoopVectorization.Instruction, reduction_ind::Int64, elementbytes::Int64)
@ LoopVectorization $HOME.julia\packages\LoopVectorization\7gWfp\src\parse\add_compute.jl:255
If I use
a[i] = exp(ai)
instead of the last two lines, it works. It also works if the last two lines areai = exp(ai/2); a[i] = ai
. I feel the issue is related to your explanation in #498, but honestly I don't fully understand that. My general feeling there is that the error it gives is unnecessary and can be ignored if it can run... Is that correct?The text was updated successfully, but these errors were encountered: