You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[CI] Separate GPU and CPU tests with pytest markers (#3404)
Add pytest.mark.gpu to tests that require CUDA, and update run_all.sh
to filter tests based on whether running on GPU or CPU machines.
Changes:
- Register 'gpu' marker in pytest.ini and conftest.py
- Add pytest.mark.gpu to ~30 tests that explicitly require CUDA
- Update run_all.sh to use GPU_MARKER_FILTER:
- GPU jobs (CU_VERSION != cpu): run only pytest.mark.gpu tests
- CPU jobs (CU_VERSION = cpu): run all tests except pytest.mark.gpu
This significantly reduces GPU machine usage by running only GPU-requiring
tests on expensive GPU runners (~30 tests instead of ~2000+). Tests that
can run on either device will run on CPU machines only.
The optimization can be disabled by setting TORCHRL_GPU_FILTER=0.
ghstack-source-id: cf14d1e
Pull-Request: #3404
0 commit comments