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.
Fix Debug Launcher + CUDA breakage with tests
What does this add?
This PR introduces fixes for tests that run
debug_launcher
. They must be performed only on the CPU, as otherwise at some point if any previous tests were ran on the GPU, CUDA has been initialized for this instance of python and as a result torch will complain and break saying that a multiprocessing error has occured.Who is it for?
closes #402
Why is it needed?
Currently running all of the tests will crash the CUDA process, due to it trying to reinitialize CUDA. From there we had the Makefile split into 2 separate calls to pytest, but given that this breakage (and since they really only run on the CPU), these tests are now under a
require_cpu
tag that will only run if CUDA is not available.What parts of the API does this impact?
User-facing:
Nothing
Internal structure:
If any test should be ran on the GPU, decorate it with: