Skip to content

Eliminates noisy assert spew when running test_cuda.py#8531

Merged
soumith merged 3 commits intopytorch:masterfrom
mruberry:test_cuda_noise
Jun 15, 2018
Merged

Eliminates noisy assert spew when running test_cuda.py#8531
soumith merged 3 commits intopytorch:masterfrom
mruberry:test_cuda_noise

Conversation

@mruberry
Copy link
Collaborator

This PR addresses issue #8342.

Currently, running test_cuda.py results in some asserts triggering and writing to stderr. This can be seen in all recent CI runs, for example. These asserts are expected, however. They and the test that intentionally triggers them were added in #7647.

Printing asserts during the tests is noisy and misleading. This PR address the issue by "muting" stderr on the existing subprocesses used by this test. The actual RuntimeError is captured separately and returned for examination, so if the error differs from what's expected it will still be reported. Muting the stderr on these subprocesses does not affect the main process, and other errors will be reported as usual.

@mruberry mruberry changed the title Test cuda noise Eliminates noisy assert spew when running test_cuda.py Jun 14, 2018
@soumith soumith merged commit 7b2ad88 into pytorch:master Jun 15, 2018
@mruberry mruberry deleted the test_cuda_noise branch August 19, 2019 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants