Run Python OP tests in a single Python process to improve test time. #8286
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.
Currently, our tests run with 2 GPUs, the init time is absurdly long: about 4s for each process.
Currently, we run each OP test on different processes. This PR:
py_test_modules
which will generate the Makefile that runs a list of Python unittest module in a single Python process.unittest
package, not just a regular python file). fromfluid/tests
tofluid/tests/unittests
.fluid/tests/unittests
in a single process, except the time-consuming tests, they are separated into different processes to utilize parallelism. Please make sure to use theunittest
package if you put the python test file influid/tests/unittests
exit(0)
fromfluid/tests/unittests/*.py
,exit(0)
is used to disable unittest, we can not do it when running all tests in a single process since it will terminate the process without running the other tests. Instead, the test is disabled influid/tests/unittests/CMakeLists.txt
. FIXME is added for each disabled item. Please disable the unittest fromfluid/tests/unittests/CMakeLists.txt
, instead of addingexit(0)
to the Python file, for all Python file influid/tests/unittests/
.