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
base: main
Are you sure you want to change the base?
Conversation
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.
src/matvis/gpu.py
Outdated
) | ||
if use_loop_over_antpairs: | ||
for j in range(nfeed): | ||
for k in range(nfeed): |
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.
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.
src/matvis/gpu/matprod.py
Outdated
|
||
for j in range(self.nfeed): | ||
for k in range(self.nfeed): | ||
for i, (ai, aj) in enumerate(self.antpairs): |
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.
per my earlier comment - with cupy I don't think the loop over nfeed is necessary
Codecov ReportAttention:
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.