Test fails when using numpy with MKL backend
See original GitHub issue% pytest -m 'not slow' -x tests/cupy_tests/fft_tests/test_fft.py
==================================================================================================================== test session starts =====================================================================================================================
platform linux -- Python 3.6.9, pytest-4.6.2, py-1.8.0, pluggy-0.12.0
rootdir: /path/to/cupy, inifile: setup.cfg
plugins: xdist-1.28.0, forked-1.0.2
collected 389 items / 1 deselected / 388 selected
tests/cupy_tests/fft_tests/test_fft.py ......................................................................................F
========================================================================================================================== FAILURES ==========================================================================================================================
_________________________________________________________________________________________________________________ TestFft2_param_1.test_fft2 _________________________________________________________________________________________________________________
self = <cupy.testing.parameterized.TestFft2_param_1 testMethod=test_fft2>, args = (), kw = {'enable_nd': True}, planning_state = True, nd_planning = True
@functools.wraps(impl)
def test_func(self, *args, **kw):
# get original global planning state
planning_state = config.enable_nd_planning
try:
for nd_planning in states:
try:
# enable or disable nd planning
config.enable_nd_planning = nd_planning
kw[name] = nd_planning
> impl(self, *args, **kw)
tests/cupy_tests/fft_tests/test_fft.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cupy/testing/helper.py:627: in test_func
impl(self, *args, **kw)
cupy/testing/helper.py:156: in test_func
accept_error=accept_error)
cupy/testing/helper.py:92: in _check_cupy_numpy_error
self.fail('Only numpy raises error\n\n' + numpy_tb)
E AssertionError: Parameterized test failed.
E
E Base test method: TestFft2.test_fft2
E Test parameters:
E shape: (3, 4)
E s: (1, None)
E axes: None
E norm: None
E
E AssertionError: Only numpy raises error
E
E Traceback (most recent call last):
E File "/path/to/cupy/cupy/testing/helper.py", line 28, in _call_func
E result = impl(self, *args, **kw)
E File "/path/to/cupy/tests/cupy_tests/fft_tests/test_fft.py", line 207, in test_fft2
E out = xp.fft.fft2(a, s=self.s, norm=self.norm)
E File "/some/path/lib/python3.6/site-packages/mkl_fft/_numpy_fft.py", line 875, in fft2
E return fftn(x, s=s, axes=axes, norm=norm)
E File "/some/path/lib/python3.6/site-packages/mkl_fft/_numpy_fft.py", line 683, in fftn
E output = mkl_fft.fftn(x, s, axes)
E File "mkl_fft/_pydfti.pyx", line 860, in mkl_fft._pydfti.fftn
E File "mkl_fft/_pydfti.pyx", line 846, in mkl_fft._pydfti._fftnd_impl
E File "mkl_fft/_pydfti.pyx", line 724, in mkl_fft._pydfti._iter_fftnd
E File "mkl_fft/_pydfti.pyx", line 684, in mkl_fft._pydfti._init_nd_shape_and_axes
E ValueError: when given, shape values must be integers
-------------------------------------------------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------------------------------------------------
dtype is <class 'numpy.float64'>
enable_nd is True
===================================================================================================== 1 failed, 86 passed, 1 deselected in 3.68 seconds ======================================================================================================
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Keras with Tensorflow backend on GPU. MKL ERROR
I installed Tensorflow with GPU support and Keras to an environment in Anaconda (v1.6.5) by using following commands ...
Read more >Intel MKL 2018 update 2 freezes during numpy test
Newly released Intel MKL 2018 Update 2 freezes when running standard numpy (1.14.2) test suite. It stops running.
Read more >Error installing NumPy via Pip on macOS Big Sur with python ...
Reproducing code example: Install Pandas with PIP after a clean install of macOS Big Sur and Python3.9 via Homebrew. pip install pandas pip3 ......
Read more >Windows 64 and 32 bit fail the NumPy test suite - PyPy
be sure you have visual studio 2015 or later installed. I use 2019. · download a windows zipfile · clone the NumPy git...
Read more >Building from source — NumPy v1.25.dev0 Manual
will prefer to use ATLAS, then BLIS, then OpenBLAS and as a last resort MKL. If neither of these exists the build will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Even when MKL is present, non-MKL versions of the functions should still be available. For NumPy <1.17, these are
numpy.fft.fftpack.*
, etc. (for numpy >=1.17numpy.fft.pocketfft.*
)`.We discussed and using
numpy.fft.fftpack
in unit tests sounds reasonable.