-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
axpy! error:parent must be contiguous #916
Comments
As for my part, I fixed the problem, making some vectors contiguous (avoiding reshaping of views). This probably will make the code even more efficient. With my last run, I see no more errors of type However, I assume that somebody from the Julia team is trying to also fix the problem, since I obtained new error messages (which were not present before):
|
From your fix in andreasvarga/MatrixEquations.jl@d3289c6, it looks like you were having zero-stride cases, which may have undefined behavior depending on which BLAS engine is used... or something like that. @N5N3 will probably know. |
The first error comes from As for the second error, it hit the layout check before BLAS call. julia> BLAS.vec_pointer_stride(view(randn(3,3),:,1:2))
(Ptr{Float64} @0x000000004778dcc0, 1)
julia> BLAS.vec_pointer_stride(view(randn(3,3),1:3,1:2))
(Ptr{Float64} @0x000000004dfe08c0, 1)
julia> BLAS.vec_pointer_stride(view(randn(3,3),1:2,1:2))
ERROR: ArgumentError: only support vector like inputs
Stacktrace:
[1] vec_pointer_stride
@ C:\Users\MYJ\AppData\Local\Programs\Julia-1.9.0-DEV\share\julia\stdlib\v1.9\LinearAlgebra\src\blas.jl:152 [inlined]
[2] vec_pointer_stride(x::SubArray{Float64, 2, Matrix{Float64}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false})
@ LinearAlgebra.BLAS C:\Users\MYJ\AppData\Local\Programs\Julia-1.9.0-DEV\share\julia\stdlib\v1.9\LinearAlgebra\src\blas.jl:151
[3] top-level scope
@ REPL[6]:1 I didn't look into your code. But I guess you'd better use Edit: some special cases. julia> BLAS.vec_pointer_stride(view(randn(3,3),1:2,1:1))
ERROR: ArgumentError: only support vector like inputs
Stacktrace:
[1] vec_pointer_stride
@ C:\Users\MYJ\AppData\Local\Programs\Julia-1.9.0-DEV\share\julia\stdlib\v1.9\LinearAlgebra\src\blas.jl:152 [inlined]
[2] vec_pointer_stride(x::SubArray{Float64, 2, Matrix{Float64}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false})
@ LinearAlgebra.BLAS C:\Users\MYJ\AppData\Local\Programs\Julia-1.9.0-DEV\share\julia\stdlib\v1.9\LinearAlgebra\src\blas.jl:151
[3] top-level scope
@ REPL[18]:1
julia> BLAS.vec_pointer_stride(view(randn(3,3),1:2,1))
(Ptr{Float64} @0x0000000048b16fc0, 1) Maybe we should ingore all 1-sized dim in the check. |
The first error has been fixed.
I tried it, but I get the same errors: A line where this happens is
The error occurs only for |
Well, that's the case above, which should be fixable. |
Thanks. Finally it is running correctly on the nightly version.
From my point of view, this issue can be closed.
N5N3 ***@***.***> schrieb am Mo., 7. März 2022, 18:21:
… Well, that's the case above, which should be fixable.
As for your case, IIUC, axpy! is used only when dll == 1.
Call axpy!(-α[1,1], view(Wv,ir1,1), view(Wv,ir1,1)) should be enough.
(Although I wonder why LinearAlgebra.axpy! not work.)
—
Reply to this email directly, view it on GitHub
<#916>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALJDHEE7S73JFHONLGXGJXDU6Y3LBANCNFSM5QCYOCWA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
commit d07b00e Author: N5N3 <[email protected]> Date: Tue Mar 8 23:54:16 2022 +0800 Extend `strides(::ReshapedArray)` with non-contiguous strided parent commit 777910d Author: N5N3 <[email protected]> Date: Tue Mar 8 02:00:08 2022 +0800 Ignore 1-sized dimension during vector layout check. Close #44497
Will get closed when the PR is merged. |
After a routine update of MatrixEquations, the nightly run fails with strange errors see here, while the tests on Julia 1.6 and 1.7 run error free. All errors contain
ArgumentError: Parent must be contiguous.
occured in
The text was updated successfully, but these errors were encountered: