Use pytest-forked for tensorflow tests#10151
Closed
driazati wants to merge 2 commits intoapache:mainfrom
driazati:forkd
Closed
Use pytest-forked for tensorflow tests#10151driazati wants to merge 2 commits intoapache:mainfrom driazati:forkd
driazati wants to merge 2 commits intoapache:mainfrom
driazati:forkd
Conversation
Contributor
|
this looks pretty good, let's see how it does in CI |
Member
|
This is great improvement! |
This auto-marks all tensorflow frontend tests with `pytest.mark.forked`, which tells pytest to run each test in a subprocess rather than in the main test process. Hopefully this will help alleviate #10150 as the memory used should be released when the test subprocess ends. Tested locally by running a tensorflow test then `ps -aef --forest` and confirming that with the decorator a subprocess is spawned. cc @areusch @altanh @tkonolige
masahi
pushed a commit
that referenced
this pull request
Feb 10, 2022
* [ci] Invoke tensorflow tests individually This is another (simpler) attempt at #10151 to avoid CUDA issues with tensorflow tests. This should work by cleaning up any reserved GPU memory by tearing down the whole process that has imported tensorflow each time a test is run. * [ci] Invoke tensorflow tests individually Copy of #10197 but using a pytest plugin instead of manually grepping through test files Co-authored-by: driazati <driazati@users.noreply.github.com>
alnah005
pushed a commit
to alnah005/tvm
that referenced
this pull request
Feb 10, 2022
* [ci] Invoke tensorflow tests individually This is another (simpler) attempt at apache#10151 to avoid CUDA issues with tensorflow tests. This should work by cleaning up any reserved GPU memory by tearing down the whole process that has imported tensorflow each time a test is run. * [ci] Invoke tensorflow tests individually Copy of apache#10197 but using a pytest plugin instead of manually grepping through test files Co-authored-by: driazati <driazati@users.noreply.github.com>
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Feb 16, 2022
* [ci] Invoke tensorflow tests individually This is another (simpler) attempt at apache#10151 to avoid CUDA issues with tensorflow tests. This should work by cleaning up any reserved GPU memory by tearing down the whole process that has imported tensorflow each time a test is run. * [ci] Invoke tensorflow tests individually Copy of apache#10197 but using a pytest plugin instead of manually grepping through test files Co-authored-by: driazati <driazati@users.noreply.github.com>
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.
This auto-marks all tensorflow frontend tests with
pytest.mark.forked, which tells pytest to run each test in a subprocess rather than in the main test process. Hopefully this will help alleviate #10150 as the memory used should be released when the test subprocess ends.Tested locally by running a tensorflow test then
ps -aef --forestand confirming that with the decorator a subprocess is spawned.cc @areusch @altanh @tkonolige