Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CuDNN test fails with parallel pytest-xdist #9128

Closed
bzamecnik opened this issue Jan 19, 2018 · 0 comments
Closed

CuDNN test fails with parallel pytest-xdist #9128

bzamecnik opened this issue Jan 19, 2018 · 0 comments

Comments

@bzamecnik
Copy link
Contributor

bzamecnik commented Jan 19, 2018

The following fails. In pytest.ini we specify two cores (-n 2) so the tests run in parallel.

py.test -s tests/keras/layers/cudnn_recurrent_test.py

Some observed error messages from TensorFlow:

  • UnknownError: Fail to find the dnn implementation.
  • InternalError (see above for traceback): Blas GEMM launch failed : a.shape=(32, 2), b.shape=(2, 2), m=32, n=2, k=2
  • e = InternalError(), message = 'GPU sync failed', m = None

If we disable pytest-xdist (-n 0) or use just a single core (-n 1) it works ok:

py.test -n 1 tests/keras/layers/cudnn_recurrent_test.py

Note that CuDNN tests require GPU (@pytest.mark.skipif) and are not ran on Travis CI, so this problem only appears with manual test invocation.

A workaround is to run this test file with single process (with -n 1 as above), which should be documented somewhere.

A better solution would be to enforce serial execution for tests in this file. So far it doesn't seem that pytest-xdist supports that directly.

System info:

  • latest Keras master: 950e5d0
  • tensorflow-gpu==1.4.1, CUDA 8.0, CuDNN 6.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants