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

Fix tests and methods with AMD ROCM #36

Merged
merged 5 commits into from
Nov 3, 2021
Merged

Fix tests and methods with AMD ROCM #36

merged 5 commits into from
Nov 3, 2021

Conversation

mlazzarin
Copy link
Contributor

@mlazzarin mlazzarin commented Nov 1, 2021

Closes #34.

  • I fixed the rocblas_status_not_implemented issue by using NumPy instead of CuPy for eigh and eigvalsh.
    The changes apply only to CuPy with AMD GPUs.
  • I completed the regression tests by running the tests on a machine with an AMD GPU and saving the output.

In order to close #34, we need also to merge qiboteam/qibo#501 in the Qibo repository.

@codecov
Copy link

codecov bot commented Nov 3, 2021

Codecov Report

Merging #36 (33c7293) into backendcls (aa3a150) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           backendcls       #36   +/-   ##
============================================
  Coverage      100.00%   100.00%           
============================================
  Files               9         9           
  Lines             977       992   +15     
============================================
+ Hits              977       992   +15     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

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

Impacted Files Coverage Δ
src/qibojit/custom_operators/backends.py 100.00% <ø> (ø)
src/qibojit/custom_operators/__init__.py 100.00% <100.00%> (ø)
src/qibojit/tests/test_backends.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa3a150...33c7293. Read the comment docs.

Copy link
Member

@stavros11 stavros11 left a comment

Choose a reason for hiding this comment

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

Looks good to me.

One possibility to avoid the if self.engine.name == "cupy" and self.engine.is_hip checks would be to rename the current CupyBackend to CUDABackend and create a new HIPBackend that inherits it and re-implements the required methods that do not work for hip. This would require to define some new methods in the backends.AbstractBackend here. As discussed with @mlazzarin it would be better to first merge this to #35 to avoid having many open PRs and we could consider this refactoring later.

Copy link
Member

@scarrazza scarrazza left a comment

Choose a reason for hiding this comment

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

@mlazzarin thanks for this. Let's merge this now and keep the inheritance for a future PR.

@scarrazza scarrazza merged commit afb2797 into backendcls Nov 3, 2021
@scarrazza scarrazza deleted the fixrocmtests branch February 11, 2022 17:43
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.

3 participants