Skip to content

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.

@codecov
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).
Report is 16 commits behind head on master.

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
Collaborator

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
Collaborator

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.

@dkarrasch
Copy link
Member Author

dkarrasch commented Feb 18, 2025

Another reason for going with this as is is that this currently returns a Matrix, and not an Adjoint. I suggest we go with it, and if we consider returning Adjoints, we should do this in several other places consistently, and we would need to evaluate the effect on the ecosystem. Perhaps now is a good idea, early in the release cycle, or would this be generally regarded as "breaking", because it changes return types?

@dkarrasch dkarrasch merged commit b464203 into master Feb 18, 2025
4 checks passed
@dkarrasch dkarrasch deleted the dk/adj_hermorsym_mul branch February 18, 2025 10:42
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