Skip to content

ci: modified test suite to run on cupy #660

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

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

mrava87
Copy link
Collaborator

@mrava87 mrava87 commented Apr 27, 2025

This PR modifies the entire test suite to run tests both using the numpy and cupy backends.

An environment variable called TEST_CUPY_PYLOPS is used to select whether to run the tests with the numpy (0) or the cupy (1) backends.

Basically one can run tests with the following commands:

# numpy
export CUPY_PYLOPS=0; export TEST_CUPY_PYLOPS=0; pytest
# cupy
export CUPY_PYLOPS=1; export TEST_CUPY_PYLOPS=1; pytest

where the first two exports aren't really needed if cupy isn't installed.

Additional requirements and environment files are provided to create cupy-enable Python environments for the CI.

@mrava87 mrava87 requested a review from cako April 28, 2025 07:31
@mrava87
Copy link
Collaborator Author

mrava87 commented Apr 28, 2025

@cako as I previously mentioned, with the help of @hongyx11 we are trying to create a self-hosted CI to test our cupy backend for the operators and solvers. Since this CI would require access to a GPU, Yuxi has kindly offered to host in on Perlmutter using a similar setup that he has in place for another project.

Would you have time to have a quick look at this PR; it is pretty boring as most code changes are as explained above to allow switching between numpy and cupy via an environment variable. However, whilst going through this refractoring of the tests, I also found a few small bugs #657 #658 #659 (always good to fix things...)

@hongyx11, I guess we need this merged before we can try together to set up the self-hosted runner, right?

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.

1 participant