JuliaSIMD / JuliaSIMD/LoopVectorization.jl

StackOverflowError in BitMatrix * vector multiplication even for n=10

Offen
#81 8 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Julia
Sterne
789
Forks
73
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I was hoping that this package would work for BitMatrix-vector multiplication, which is not supported by BLAS. However, my code encounters a StackOverflowError error:
```Julia
using LoopVectorization
using Random
function gemv_avx!(c, A, b)
@avx for j in 1:size(A, 2), i in 1:size(A, 1)
c[i] += A[i, j] * b[j]
end
end
```
```Julia
Random.seed!(2020)
n = 10
A = bitrand(n, n)
b = rand(n)
c_avx = zeros(n)

julia> gemv_avx!(c_avx, A, b)
ERROR: StackOverflowError:
Stacktrace:
[1] vfmadd_fast(::VectorizationBase.Mask{8,UInt8}, ::VectorizationBase.SVec{8,Float64}, ::VectorizationBase.SVec{8,Float64}) at /Users/biona001/.julia/packages/SIMDPirates/ig1yt/src/SIMDPirates.jl:103 (repeats 80000 times)
```

[Issue 61](https://github.com/chriselrod/LoopVectorization.jl/issues/61) seems to be related. Did I do something dumb here?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Reproduce the failure with the shown gemv_avx! function, BitMatrix inputs, and n=10. Start at SIMDPirates.jl:103 and compare with the related behavior in Issue 61; done means BitMatrix-vector multiplication no longer overflows the stack and the example completes successfully.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
julia
Bereich
performance
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.