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
We are getting resource constrained on how many multi-GPU tests we can run. To address this, we should split apart which tests require being run on 2 GPUs and which can run on a single.
The approach is:
Create pytest markers (registering them in pytest.ini to avoid warnings): multigpu and singlegpu
Create new github action workflows to execute on the 2GPU runners, and use the multigpu test fixture.
Run the rest of the tests on the 1GPU runners
This will allow us to run the single and multi-gpu tests in parallel, and only use the limited multi-gpu resources for tests that actually require it.
Annotating tests
To run tests only in multi-gpu settings:
@pytest.mark.multigpudeftest_multi():
assertTrue
To run tests in both single- and multiple-gpu settings:
To run tests in single-gpu settings only, no annotation is needed:
deftest_single():
assertTrue
Running tests
To execute the tests, use the following pytest commands:
To run multi-gpu tests:
pytest -m "multigpu"
To run single-gpu tests, we need two commands. One will run the unannotated tests (most of them) the other will run the single-gpu setting of the ones marked as both singlegpu and multigpu
Description
We are getting resource constrained on how many multi-GPU tests we can run. To address this, we should split apart which tests require being run on 2 GPUs and which can run on a single.
The approach is:
pytest.ini
to avoid warnings):multigpu
andsinglegpu
2GPU
runners, and use themultigpu
test fixture.1GPU
runnersThis will allow us to run the single and multi-gpu tests in parallel, and only use the limited multi-gpu resources for tests that actually require it.
Annotating tests
To run tests only in multi-gpu settings:
To run tests in both single- and multiple-gpu settings:
To run tests in single-gpu settings only, no annotation is needed:
Running tests
To execute the tests, use the following pytest commands:
To run multi-gpu tests:
pytest -m "multigpu"
To run single-gpu tests, we need two commands. One will run the unannotated tests (most of them) the other will run the single-gpu setting of the ones marked as both
singlegpu
andmultigpu
Repositories
The text was updated successfully, but these errors were encountered: