heat icon indicating copy to clipboard operation
heat copied to clipboard

Batched matrix multiplication.

Open FOsterfeld opened this issue 1 year ago • 37 comments

split dimension is a batch dimension

Due Diligence

  • General:
    • [ ] base branch must be main for new features, latest release branch (e.g. release/1.3.x) for bug fixes
    • [ ] title of the PR is suitable to appear in the Release Notes
  • Implementation:
    • [ ] unit tests: all split configurations tested
    • [ ] unit tests: multiple dtypes tested
    • [ ] documentation updated where needed

Description

Issue/s resolved: #

Changes proposed:

Type of change

Memory requirements

Performance

Does this change modify the behaviour of other functions? If so, which?

yes / no

FOsterfeld avatar Nov 08 '23 13:11 FOsterfeld

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

ghost avatar Nov 08 '23 13:11 ghost

Thank you for the PR!

github-actions[bot] avatar Nov 08 '23 14:11 github-actions[bot]

Codecov Report

Attention: Patch coverage is 94.17040% with 13 lines in your changes missing coverage. Please review.

Project coverage is 91.96%. Comparing base (a774559) to head (35ff132). Report is 60 commits behind head on main.

Files Patch % Lines
heat/core/linalg/basics.py 94.17% 13 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1261      +/-   ##
==========================================
+ Coverage   91.91%   91.96%   +0.05%     
==========================================
  Files          80       80              
  Lines       11942    12161     +219     
==========================================
+ Hits        10976    11184     +208     
- Misses        966      977      +11     
Flag Coverage Δ
unit 91.96% <94.17%> (+0.05%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 08 '23 15:11 codecov[bot]

Sieht gut aus soweit :+1:

Vorschläge für die weitere Arbeit:

  • Wenn du oben neben "codecov" (rotes X) auf Details und dann auf "View this Pull Request on Codecov" gehst, kannst du sehen, welche Zeilen deiner Änderungen nicht getestet werden bisher. Entsprechende Tests kannst du in heat/core/linalg/tests/test_basics.py unterbringen. Mit diesem Fall wäre dann gebatchte Matrizenmultiplikation für den Fall abgedeckt, dass die LA-Dimensionen nicht gesplitted sind. Dies entspricht quasi dem Hinzufügen von Batchdimensionen zum Fall "2xsplit=None" im ursprünglichen Code.
  • Als nächstes könnten wir den Fall angehen, dass zu den anderen 8 (?) bestehenden Fällen Batch-dimensionen hinzugefügt werden; nun wäre allerdings die Batchdimension nicht gesplitted und dafür evtl. die LA-Dimension. Mit etwas Glück lässt sich das recht einfach aus dem bestehenden Code erzeugen, da ja PyTorch bereits gut mit Batches arbeiten kann.
  • Den Fall, dass einmal eine LA-Dimension gesplitted ist und einmal eine Batchdimension gesplitted ist, würde ich ausschließen und eine enstprechende Fehlermeldung ausgeben.

mrfh92 avatar Nov 13 '23 07:11 mrfh92

Thank you for the PR!

github-actions[bot] avatar Nov 21 '23 09:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Nov 21 '23 10:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Nov 21 '23 11:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Nov 21 '23 12:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Nov 21 '23 14:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Nov 21 '23 14:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Nov 21 '23 15:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Nov 22 '23 13:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Nov 23 '23 12:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Nov 28 '23 15:11 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Dec 14 '23 17:12 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Dec 27 '23 15:12 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Dec 27 '23 16:12 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Dec 27 '23 17:12 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Dec 27 '23 22:12 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Jan 02 '24 11:01 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Jan 08 '24 09:01 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Jan 09 '24 15:01 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Jan 22 '24 12:01 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Feb 01 '24 08:02 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Feb 05 '24 08:02 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Feb 06 '24 15:02 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Feb 14 '24 07:02 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Feb 20 '24 07:02 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Feb 29 '24 16:02 github-actions[bot]

Thank you for the PR!

github-actions[bot] avatar Mar 07 '24 11:03 github-actions[bot]