question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

test_omp_cv fails with MKL and AVX-512

See original GitHub issue

In newly released scikit-learn 0.20.1 (and actually in 0.20.0) test_omp_cv case fails during running test suite. Any help appreciated!

_______________________________ test_omp_cv _______________________________

    def test_omp_cv():
        y_ = y[:, 0]
        gamma_ = gamma[:, 0]
        ompcv = OrthogonalMatchingPursuitCV(normalize=True, fit_intercept=False,
                                            max_iter=10, cv=5)
        ompcv.fit(X, y_)
>       assert_equal(ompcv.n_nonzero_coefs_, n_nonzero_coefs)

/usr/local/lib/python3.6/dist-packages/scikit_learn-0.20.1-py3.6-linux-x86_64.egg/sklearn/linear_model/tests/test_omp.py:209: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.6/unittest/case.py:829: in assertEqual
    assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__>, first = 6, second = 5, msg = '6 != 5'

    def _baseAssertEqual(self, first, second, msg=None):
        """The default assertEqual implementation, not type specific."""
        if not first == second:
            standardMsg = '%s != %s' % _common_shorten_repr(first, second)
            msg = self._formatMessage(msg, standardMsg)
>           raise self.failureException(msg)
E           AssertionError: 6 != 5

/usr/lib/python3.6/unittest/case.py:822: AssertionError

Versions

System: python: 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] executable: /usr/bin/python3 machine: Linux-4.15.0-39-generic-x86_64-with-Ubuntu-18.04-bionic

BLAS: macros: SCIPY_MKL_H=None, HAVE_CBLAS=None lib_dirs: /opt/intel/mkl/lib/intel64 cblas_libs: mkl_rt, pthread

Python deps: pip: 18.1 setuptools: 40.6.2 sklearn: 0.20.1 numpy: 1.15.4 scipy: 1.1.0 Cython: 0.29 pandas: None

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:27 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
h6197627commented, Jul 25, 2019

@rth, I can confirm that the test is not failing anymore. Thanks for fixing it!

1reaction
cgohlkecommented, Jul 17, 2019

If it is helpful - I tried to test Windows build (with MKL) from https://www.lfd.uci.edu/~gohlke/pythonlibs on the same PC. OMP failure occurs as in Linux test

I can not reproduce this on my system. The test_omp tests pass.

I re-ran the tests on a Xeon W-2155 CPU with AVX-512 and could reproduce the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is AVX512 not autodetected and used in MKL?
Hi Erling,. Intel MKL automatically queries and then dispatches the code path supported on your Intel® processor to the optimal instruction set architecture ......
Read more >
Intel's MKL
MKL automatically uses the newer features (AVX, AVX2, AVX-512) of Intel ... So if one's MKL fails to recognise a Kaby Lake CPU,...
Read more >
There isn't much different between AVX2 and AVX512 when ...
I assume your intentions are to test TensorFlow accelerated with MKLDNN. Unlike traditional MKL lib, this lib features math accelerations ...
Read more >
Acceleration of Intel MKL on AMD Ryzen CPU's - Performance
Intel MKL is composed of few code paths for different features of the CPU (SSE2, SSE4, AVX2, AVX512, etc…). One of the issues...
Read more >
AVX-512 Auto-Vectorization in MSVC - C++ Team Blog
So far, we haven't measured slowdown comparing with AVX2 when bringing up the AVX-512 auto-vectorizer. We will keep a close eye on this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found