-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
It might be a bit too early to be submitting feature requests, but I recently started toying with LoopModels and thought it would not be a bad idea to copy over some of the LoopVectorizations feature requests that are important to me. Hopefully when this project is mature enough I would be able to contribute actual PRs.
Namely, the transformation mapreduce(fₐ, opₐ, arr)
into fᵦ(reduce(opᵦ, arr))
can be extremely useful for increasing performance by taking the elementwise function f
and factoring it out of the loop (maybe with some transformation applied to it).
- In classical error correcting codes and quantum Clifford circuits it is about factoring out
count_ones
over the xor operator. - In probability theory /stats it is about using
log(x*y)=log(x)+log(y)
- It seems it is also useful in graph theory and GraphBLAS has the arithmetic semiring (+, *) replaced with an arbitrary one like (max, +) for instance.
References:
- manually provide reduction isomorphisms so that expensive operations can be factored out of the loop JuliaSIMD/LoopVectorization.jl#291
- Generalize matmul to arbitrary + and * JuliaLinearAlgebra/Octavian.jl#102
- https://discourse.julialang.org/t/how-to-do-simd-code-with-wide-register-accumulators-simd-vs-loopvectorization-jl-vs-simd-jl/63322
chriselrod and Uroc327
Metadata
Metadata
Assignees
Labels
No labels