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

Cupy matrices #199

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

Cupy matrices #199

wants to merge 20 commits into from

Conversation

BrunoLiegiBastonLiegi
Copy link
Contributor

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi commented Jan 14, 2025

This attempts to reintroduce the cupy matrices as default for the cupy backend, as discussed in #196. It also fixes a bunch of other tests that were failing with cupy.

edit: The tests seem to run fine on my local GPU, however I had to implement a maybe redundant class CustomCupyMatrices, which may be unnecessary under a more suitable inheritance chain of the matrices defined inside backends,matrices.py

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.91%. Comparing base (b782805) to head (8302937).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #199   +/-   ##
=======================================
  Coverage   99.91%   99.91%           
=======================================
  Files          12       12           
  Lines        1115     1116    +1     
=======================================
+ Hits         1114     1115    +1     
  Misses          1        1           
Flag Coverage Δ
unittests 99.91% <100.00%> (+<0.01%) ⬆️

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.

Fixes for GPU tests and GPU workflow
@andrea-pasquale
Copy link
Contributor

Before I forget it would be nice to modify these lines

def test_metabackend_list_available():
available_backends = dict(zip(("numba", "cupy", "cuquantum"), (True, False, False)))
assert MetaBackend().list_available() == available_backends

whenever I test locally I need to edit them. Do you think that we can add some try-except blocks to check which gpu backends are available?

@BrunoLiegiBastonLiegi
Copy link
Contributor Author

yeah, definitely.

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.

2 participants