Repository navigation
Add Colab notebook for real-GPU validation - #6
Merged
Merged
Conversation
- notebooks/gpu_validation.ipynb: runs the full test suite including the real-CuPy tests (skipped on GPU-less CI), the CPU vs GPU benchmark, and prints a summary; degrades gracefully without an NVIDIA driver and is safe to "Run all" repeatedly - README: Open in Colab badge in the GPU section
Measured with notebooks/gpu_validation.ipynb on Google Colab: 130 tests pass with none skipped (14 real-GPU tests), GPU and CPU results agree to about 1e-15, and a 3D rotating GPE run is 7.6-12.5x faster than Colab's 2-vCPU CPU (about 3x faster than an 8-core Apple M1 at 128^3).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GitHub's hosted runners have no GPU, so the real-CuPy tests are always skipped in CI. This adds
notebooks/gpu_validation.ipynb, which can be opened in Google Colab on a free GPU runtime. The notebook:test_real_cupy_matches_cpuand the legacytests/test_3d_gpu_solver.py;It also explains itself and skips the GPU parts when no NVIDIA driver is present, and it is safe to run more than once. The README GPU section gains an "Open in Colab" badge.
Test plan
nbformat