JuliaSIMD / JuliaSIMD/LoopVectorization.jl

StackOverflowError in BitMatrix * vector multiplication even for n=10

Open
#81 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
789
Forks
73
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.