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

feat: add ability to do vector-vector loop #75

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

steven-murray
Copy link
Contributor

This adds the ability to do the matrix-matrix calculation instead as a targeted set of vector-vector dot products for only the pairs we care about.

BREAKING CHANGE: this is very much a breaking change. The biggest
    API-facing change is that the output is now (Ntime, Nfeed, Nfeed, Npairs)
    instead of (Ntime, Nfeed, Nfeed, Nant, Nant). However, other
    additions are the inclusion of the choice of different methods for
    performing the matrix product.
)
if use_loop_over_antpairs:
for j in range(nfeed):
for k in range(nfeed):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the double loop over nfeed slow this down at all? I think with cupy the nfeed dimension could be wrapped into the dot product like it is in the cpu version. Maybe it doesn't matter though.


for j in range(self.nfeed):
for k in range(self.nfeed):
for i, (ai, aj) in enumerate(self.antpairs):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per my earlier comment - with cupy I don't think the loop over nfeed is necessary

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Attention: 290 lines in your changes are missing coverage. Please review.

Comparison is base (242ea98) 100.00% compared to head (74de314) 60.33%.
Report is 5 commits behind head on main.

❗ Current head 74de314 differs from pull request most recent head 0d5d189. Consider uploading reports for the commit 0d5d189 to get more accurate results

Files Patch % Lines
src/matvis/gpu/gpu.py 0.00% 104 Missing ⚠️
src/matvis/gpu/beams.py 0.00% 52 Missing ⚠️
src/matvis/gpu/_cublas.py 0.00% 48 Missing ⚠️
src/matvis/gpu/matprod.py 0.00% 37 Missing ⚠️
src/matvis/gpu/coords.py 0.00% 22 Missing ⚠️
src/matvis/gpu/getz.py 0.00% 11 Missing ⚠️
src/matvis/core/beams.py 92.98% 2 Missing and 2 partials ⚠️
src/matvis/core/matprod.py 90.62% 2 Missing and 1 partial ⚠️
src/matvis/wrapper.py 62.50% 3 Missing ⚠️
src/matvis/_utils.py 96.36% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff              @@
##              main      #75       +/-   ##
============================================
- Coverage   100.00%   60.33%   -39.67%     
============================================
  Files            8       23       +15     
  Lines          566      779      +213     
  Branches        88      102       +14     
============================================
- Hits           566      470       -96     
- Misses           0      301      +301     
- Partials         0        8        +8     
Flag Coverage Δ
unittests 60.07% <50.75%> (-39.22%) ⬇️

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

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

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.

None yet

2 participants