-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Support StridedArrays with strides not supported by BLAS routines #9504
Comments
More context will be needed. DGEMM performs multiplication of dense matrices. Does that help you to narrow down where the error is occurring? Also, it will help to have the output of versioninfo() |
Please post a minimal example of code that triggered this problem and the result of |
Yeah, I'm trying to track it down right now. I'll post as I figure it out. |
|
Alright, this reproduces exactly the error: using ArrayViews
function moving_window(arr, n)
shp = (size(arr, 1) * n, size(arr, 2) - n + 1)
strided_view(arr, shp, ArrayViews.contrank(arr), strides(arr))
end
x = rand(5, 5)
rand(10, 4) * moving_window(x, 2) |
Oops, that should be |
Thanks. I can reproduce the bug. Parameter 10 is calculated in |
Well, I'm specifying a custom stride in |
Can DGEMM even handle a matrix laid out in this way? I'm not familiar with BLAS. |
I'm not sure exactly what your code is supposed to do, but if you set julia> x=reshape(1.:25.,5,5)
5x5 Array{Float64,2}:
1.0 6.0 11.0 16.0 21.0
2.0 7.0 12.0 17.0 22.0
3.0 8.0 13.0 18.0 23.0
4.0 9.0 14.0 19.0 24.0
5.0 10.0 15.0 20.0 25.0 then the [1.0 6.0 11.0 16.0
2.0 7.0 12.0 17.0
3.0 8.0 13.0 18.0
4.0 9.0 14.0 19.0
5.0 10.0 15.0 20.0
6.0 11.0 16.0 21.0
7.0 12.0 17.0 22.0
8.0 13.0 18.0 23.0
9.0 14.0 19.0 24.0
10.0 15.0 20.0 25.0] Is that the expected matrix? |
Yup, exactly |
If the desired stride is indeed 5, then BLAS cannot handle this computation. The documentation linked to above states that the parameter I'm not really sure what to do here. Maybe we can insert a runtime check in |
Fix #9504. Check second stride before calling BLAS.
(cherry picked from commit 2101028) Conflicts: base/linalg/matmul.jl
I'm getting "Intel MKL ERROR: Parameter 10 was incorrect on entry to DGEMM ." printed to stdout with no other indication of what went wrong.
The text was updated successfully, but these errors were encountered: