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

[MRG] fix gpu compatibility of srGW solvers #596

Merged
merged 13 commits into from
Jan 14, 2024

Conversation

cedricvincentcuaz
Copy link
Collaborator

@cedricvincentcuaz cedricvincentcuaz commented Jan 14, 2024

Types of changes

Tests on the first marginal within sr(F)GW solvers were not compatible with gpu usage as
np.testing.assert_allclose(nx.sum(G0, 1), p, atol=1e-08)
implies that variables are converted to numpy and stored on cpu before the test. This test fails if it requires first to move variables from gpu to cpu.

Fix: assert nx.allclose(nx.sum(G0, 1), p, atol=1e-08)

Motivation and context / Related issue

How has this been tested (if it applies)

PR checklist

  • I have read the CONTRIBUTING document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.
  • I have added the PR and Issue fix to the RELEASES.md file.

Copy link

codecov bot commented Jan 14, 2024

Codecov Report

Merging #596 (c89d98a) into master (336980f) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #596   +/-   ##
=======================================
  Coverage   96.75%   96.75%           
=======================================
  Files          77       77           
  Lines       15961    15961           
=======================================
  Hits        15443    15443           
  Misses        518      518           

@cedricvincentcuaz cedricvincentcuaz changed the title [WIP] fix gpu compatibility of srGW solvers [MRG] fix gpu compatibility of srGW solvers Jan 14, 2024
@cedricvincentcuaz cedricvincentcuaz merged commit f395e58 into PythonOT:master Jan 14, 2024
15 checks passed
@cedricvincentcuaz cedricvincentcuaz deleted the doc_srgw branch January 17, 2024 01:03
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