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

Materialize adjoint in mul with HermOrSym #1191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkarrasch
Copy link
Member

Fixes #850, at least the original issue. Promoting Bool to some BlasFloat seems to be very tricky in terms method ambiguities.

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.90%. Comparing base (c9ad828) to head (d71f9b8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1191   +/-   ##
=======================================
  Coverage   91.89%   91.90%           
=======================================
  Files          34       34           
  Lines       15360    15366    +6     
=======================================
+ Hits        14115    14122    +7     
+ Misses       1245     1244    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dkarrasch
Copy link
Member Author

x-ref JuliaLang/julia#52787 for the Bool case.

@araujoms
Copy link
Contributor

araujoms commented Feb 3, 2025

Why not implement @mcabbott 's suggestion, though? It is faster for small matrices and avoids a copy.

@dkarrasch
Copy link
Member Author

We seem to avoid wrapping results in adjoint or transpose, or, better said, we materialize the final wrapper:

A' * Q = copy((Q' * A)')

We return wrapped results only when the first factor is an adjoint vector.

@araujoms
Copy link
Contributor

araujoms commented Feb 4, 2025

Why, though? I don't see the problem with wrapping results in adjoint or transpose.

@dkarrasch
Copy link
Member Author

@andreasnoack Do you remember why we typically materialize products that we compute by the adjoint formula, except for AdjOrTransAbsVec?

@andreasnoack
Copy link
Member

I don't remember the specifics here. Only that the wrapped versions can sometimes lead to performance issues because they wrappers sometimes causes dispatch to slow fallback definitions for AbstractMatrix.

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

Successfully merging this pull request may close these issues.

Multiplying Adjoint with Symmetric uses slow generic matmul
3 participants