Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Error in mkldnn unit test #17352

Closed
apeforest opened this issue Jan 17, 2020 · 3 comments · Fixed by #17386
Closed

Error in mkldnn unit test #17352

apeforest opened this issue Jan 17, 2020 · 3 comments · Fixed by #17386

Comments

@apeforest
Copy link
Contributor

Description

When I ran nosetests -v tests/python/mkl/test_mkldnn.py, all the tests passed.
If I ran nosetests -v tests/python/mkl/test_mkldnn.py:test_mkldnn_engine_threading, it failed with

test_mkldnn.test_mkldnn_engine_threading ... ERROR

======================================================================
ERROR: test_mkldnn.test_mkldnn_engine_threading
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/.virtualenvs/mxnet/lib/python3.6/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/ubuntu/src/mxnet/tests/python/mkl/test_mkldnn.py", line 98, in test_mkldnn_engine_threading
    assert_almost_equal(y[0, 0, 0, 0], np.array(0.016711406))
  File "/home/ubuntu/src/mxnet/python/mxnet/test_utils.py", line 610, in assert_almost_equal
    aTmp[index] = bTmp[index] = 0
TypeError: 'numpy.float32' object does not support item assignment
-------------------- >> begin captured stdout << ---------------------

*** Maximum errors for vector of size 1:  rtol=1e-05, atol=1e-20

  1: Error 1920385.369517  Location of error: (), a=0.33763480, b=0.01671141

--------------------- >> end captured stdout << ----------------------

To Reproduce

nosetests -v tests/python/mkl/test_mkldnn.py:test_mkldnn_engine_threading

@apeforest apeforest changed the title Error in mkl test Error in mkldnn unit test Jan 17, 2020
@apeforest
Copy link
Contributor Author

@PatricZhao @TaoLv Did you encounter this before? Thanks

@TaoLv
Copy link
Member

TaoLv commented Jan 17, 2020

Yes, we're aware of this problem as in our local validation system, python tests are split into single run for each test. We didn't dive into the problem as we thought it's a problem of nosetests or how the nosetests file is implemented. I remember these was an similar issue but cannot find it anymore.

@TaoLv
Copy link
Member

TaoLv commented Jan 17, 2020

@juliusshufan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants