-
Notifications
You must be signed in to change notification settings - Fork 54
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
Batched matrix multiplication. #1261
Batched matrix multiplication. #1261
Conversation
split dimension is a batch dimension
…gebra_for_arrays_with_dimension_2_in_particular_matmul
Thank you for the PR! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1261 +/- ##
==========================================
+ Coverage 92.07% 92.13% +0.05%
==========================================
Files 83 83
Lines 12196 12163 -33
==========================================
- Hits 11230 11206 -24
+ Misses 966 957 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
heat/core/linalg/basics.py
Outdated
@@ -487,9 +487,12 @@ def matmul(a: DNDarray, b: DNDarray, allow_resplit: bool = False) -> DNDarray: | |||
sanitation.sanitize_in(a) | |||
sanitation.sanitize_in(b) | |||
|
|||
if a.gshape[-1] != b.gshape[0]: | |||
batch_dim = max(a.ndim, b.ndim) - 2 | |||
batched = batch_dim > 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe > 0
instead of >2
or did I understand sth wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, you're right, it should be 0.
Sieht gut aus soweit 👍 Vorschläge für die weitere Arbeit:
|
Thank you for the PR! |
Thank you for the PR! |
Thank you for the PR! |
…gebra_for_arrays_with_dimension_2_in_particular_matmul
Thank you for the PR! |
Thank you for the PR! |
Thank you for the PR! |
Thank you for the PR! |
Thank you for the PR! |
…gebra_for_arrays_with_dimension_2_in_particular_matmul
Thank you for the PR! |
…gebra_for_arrays_with_dimension_2_in_particular_matmul
Thank you for the PR! |
@FOsterfeld Something seems to have changed that lets the tests in QR fail. Can you reproduce this error on the workstation? |
…gebra_for_arrays_with_dimension_2_in_particular_matmul
Thank you for the PR! |
Thank you for the PR! |
…gebra_for_arrays_with_dimension_2_in_particular_matmul
Thank you for the PR! |
Benchmarks results - Sponsored by perun
Grafana Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@mtar have your suggestions been addressed by the changes? |
…gebra_for_arrays_with_dimension_2_in_particular_matmul
Thank you for the PR! |
Benchmarks results - Sponsored by perun
Grafana Dashboard |
split dimension is a batch dimension
Due Diligence
main
for new features, latest release branch (e.g.release/1.3.x
) for bug fixesDescription
Issue/s resolved: #890
Changes proposed:
Type of change
Memory requirements
Performance
Does this change modify the behaviour of other functions? If so, which?
yes / no