JuliaSIMD / JuliaSIMD/LoopVectorization.jl
BitArray support?
- Lingua principale
- Julia
- Stelle
- 789
- Fork
- 73
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
In some cases, @ turbo is far slower on BitArrays than on anything else, and in other cases check_args fails and the vectorization doesn't happen. I can't replicate the check_args failing, but will return with an MWE when I figure that out.
```julia
using LoopVectorization, BenchmarkTools
D = rand(10000, 20000); D_bit = D .> .5; D_bool = Array{Bool}(D_bit)
function test_sum_turbo(data::D) where {T, D <: AbstractArray{T,2}}
contribution = 0
@turbo for n ∈ axes(data, 1), t ∈ axes(data, 2)
contribution += data[n,t]
end
return contribution
end
julia> @btime test_sum_turbo($D)
45.742 ms (0 allocations: 0 bytes)
9.999992255027126e7
julia> @btime test_sum_turbo($D_bit)
69.028 ms (0 allocations: 0 bytes)
99998730
julia> @btime test_sum_turbo($D_bool)
15.711 ms (0 allocations: 0 bytes)
99998730
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start with the supplied test_sum_turbo example and benchmark @turbo on BitArray, Array{Bool}, and floating-point arrays. Reproduce the slowdown and obtain the missing minimal working example for the check_args failure; the issue names no source file or test, so completion would require confirming the cause and an appropriate fix or limitation.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- julia
- Ambito
- performance
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100