-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Allow for device agnostic testing #8223
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8223 +/- ##
==========================================
- Coverage 88.10% 87.41% -0.70%
==========================================
Files 473 473
Lines 28644 28647 +3
==========================================
- Hits 25238 25042 -196
- Misses 3406 3605 +199
... and 35 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This PR changes the test suite to allow running the tests on any hardware.
The change is rather small and targets the tests that run both on the cpu and gpu. For these tests the decorator is changed to also read from a couple of environment variables that can specify the device and optionally the backend.
Using environment variables has the benefit of avoiding further changes to the code while also providing some degree of future proofing. If in the future new hardware vendors want to run the PyG test suite on their hardware they simply can use the environment variables.
Usage:
TORCH_DEVICE=some_new_hw TORCH_BACKEND=torch_new_hw pytest test