Skip to content
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

Avoid generic fallback for Ac_mul_B #600

Closed
mlubin opened this issue Oct 18, 2015 · 2 comments
Closed

Avoid generic fallback for Ac_mul_B #600

mlubin opened this issue Oct 18, 2015 · 2 comments

Comments

@mlubin
Copy link
Member

mlubin commented Oct 18, 2015

Writing X'*y can lead to performance warnings. Looks like it's using the generic fallback.

julia> m = Model();

julia> @defVar(m, X[1:3,1:3]);

julia> @defVar(m, y[1:3]);

julia> @which X*y
*[...] at /home/mlubin/.julia/v0.4/JuMP/src/operators.jl:390

julia> @which X'*y
Ac_mul_B{T,S}(A::Union{DenseArray{T,2},SubArray{T,2,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}, x::Union{DenseArray{S,1},SubArray{S,1,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}}) at linalg/matmul.jl:119
@joehuchette
Copy link
Contributor

I really didn't want to get in the business of overloading A_mul_B and friends, but maybe it's inevitable.

@mlubin
Copy link
Member Author

mlubin commented Feb 25, 2019

There are likely still performance issues in the overloads, but this is stale because all of the linear algebra has been rewritten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants