-
Notifications
You must be signed in to change notification settings - Fork 152
Matrix Multiplication for large SizedArray #734
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
Labels
Comments
I haven't been able to reproduce this yet. The following works for me: julia> a = rand(SizedMatrix{20,20});
julia> a*a
20×20 SArray{Tuple{20,20},Float64,2,400} with indices SOneTo(20)×SOneTo(20):
... (You'll notice it produces an Could you provide a complete self contained example of the failure? |
Sorry, my bad, I forgot to mention I'm using the in-place matrix multiply julia> a = rand(SizedMatrix{20,20});
julia> b = rand(SizedMatrix{20,20});
julia> c = zeros(SizedMatrix{20,20});
julia> mul!(c,a,b)
ERROR: conversion to pointer not defined for SizedArray{Tuple{20,20},Float64,2,2}
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] unsafe_convert(::Type{Ptr{Float64}}, ::SizedArray{Tuple{20,20},Float64,2,2}) at ./pointer.jl:67
[3] macro expansion at /home/brian/.julia/packages/StaticArrays/1g9bq/src/matrix_multiply.jl:307 [inlined]
[4] mul_blas!(::Size{(20, 20)}, ::SizedArray{Tuple{20,20},Float64,2,2}, ::Size{(20, 20)}, ::Size{(20, 20)}, ::SizedArray{Tuple{20,20},Float64,2,2}, ::SizedArray{Tuple{20,20},Float64,2,2}) at /home/brian/.julia/packages/StaticArrays/1g9bq/src/matrix_multiply.jl:289
[5] macro expansion at /home/brian/.julia/packages/StaticArrays/1g9bq/src/matrix_multiply.jl:266 [inlined]
[6] _mul! at /home/brian/.julia/packages/StaticArrays/1g9bq/src/matrix_multiply.jl:248 [inlined]
[7] mul!(::SizedArray{Tuple{20,20},Float64,2,2}, ::SizedArray{Tuple{20,20},Float64,2,2}, ::SizedArray{Tuple{20,20},Float64,2,2}) at /home/brian/.julia/packages/StaticArrays/1g9bq/src/matrix_multiply.jl:17
[8] top-level scope at REPL[8]:1
|
Indeed that's a bug, thanks for the report! |
Fixed in #738 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get the following error when multiplying two SizedArrays
conversion to pointer not defined for SizedArray{Tuple{20,20},Float64,2,2}
This occurs when the the
_mul
method passes the arrays to BLAS, and the error happens on theccal
inmul_blas!
.The text was updated successfully, but these errors were encountered: