-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
performanceMust go fasterMust go fasterspeculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative
Description
We need a framework to express certain mathematical optimizations in julia itself. These may be expressed as rules that are run after types have been inferred. Examples are:
A' * B, A' \ B
: Can be computed without computing the transpose by calling BLAS/LAPACK routinesA - B + C .* D
: Can be computed without temporariesA[m:n, p:q] + B
: Avoid computing the ref.A[m:n, p:q] * B
: Avoid computing the sref, and call DGEMM directly in cases where this is possible.[ a b c; d f; e]
: Compute the entire concatenation in one shot.A[p,q] = B[r,s]
: Temporary can be avoided by callingassign(A, sub(B, r, s), p, q)
In all cases, temporaries can be avoided. Either we can do it with optimizations, or have the parser such expressions down to the runtime. If a matching runtime implementation for such cases is not found, the existing base case should certainly be used.
Metadata
Metadata
Assignees
Labels
performanceMust go fasterMust go fasterspeculativeWhether the change will be implemented is speculativeWhether the change will be implemented is speculative