8000 Build aarch64 wheels by janaknat · Pull Request #5197 · scikit-image/scikit-image · GitHub
[go: up one dir, main page]

Skip to content

Build aarch64 wheels #5197

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

Merged
merged 2 commits into from
Jan 30, 2021
Merged

Build aarch64 wheels #5197

merged 2 commits into from
Jan 30, 2021

Conversation

janaknat
Copy link
Contributor

From v1.8.0, cibuildwheel allows to build non-native architecture using the CIBW_ARCHS_LINUX option.
Build log: https://github.com/janaknat/scikit-image/actions/runs/510106566

Description

Checklist

For reviewers

  • Check that the PR title is short, concise, and will make sense 1 year
    later.
  • Check that new functions are imported in corresponding __init__.py.
  • Check that new features, API changes, and deprecations are mentioned in
    doc/release/release_dev.rst.

@janaknat
Copy link
Contributor Author

I had to separate each of the python build jobs. Since QEMU is used to emulate aarch64, the build time for each python version took around 2-3 hours. Github Actions times out at 6 hours. To successfully build all the wheels, it was necessary to run all the wheel builds in parallel.

@janaknat janaknat mentioned this pull request Jan 26, 2021
@@ -30,10 +179,9 @@ jobs:

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.6.3
python -m pip install cibuildwheel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

From v1.8.0, cibuildwheel allows to build non-native architecture using the CIBW_ARCHS_LINUX option.
@janaknat
Copy link
Contributor Author
janaknat commented Jan 26, 2021

Updated to consolidate linux 3.7, 3.8 and 3.9 python jobs into 1 build step that spawns parallel jobs.

Copy link
Member
@jni jni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janaknat Thank you so much for taking the initiative here again! 🙏🙏🙏 I only have one question about the 36 job — happy to merge temporarily, push out a new 0.17, and then remove, I just want to make sure we're on the same page. Going forward, we don't intend to support 3.6, nor the earlier 0.17 branch.

@@ -10,13 +10,89 @@ on:
- v*

jobs:
build_wheels:
build_linux_36_wheels:
Copy link
Member
8000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janaknat Do I interpret this action correctly that it only builds wheels for 36 on the 0.17 branch? Would you like us to push out a final 0.17.x release, after which this job can be deleted? Or am I misinterpreting this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went by what was already present in the cibuildwheel.yml file for x86. I just checked PyPI and it looks like python 3.6 didn't have any wheels. Then I would go ahead and only release 3.7, 3.8 and 3.9 wheels. I can update the PR to remove the config for python 3.6.

Support for python 3.6 is ending for scikit-image.
@janaknat
Copy link
Contributor Author

@jni I've added a patch that removes the python 3.6 build config.

@jni
Copy link
Member
jni commented Jan 29, 2021

@scikit-image/core anyone else want to review/merge this?

@alexdesiqueira
Copy link
Member

I'll ask if @hmaarrfk has some input before merging, Juan 🙂

@hmaarrfk hmaarrfk merged commit 1bfeb15 into scikit-image:master Jan 30, 2021
@hmaarrfk
Copy link
Member

Looks great sorry!

@janaknat
Copy link
Contributor Author

@hmaarrfk Thanks for merging. Any dates on when the aarch64 wheels show up in PyPI?

@hmaarrfk
Copy link
Member

@meeseeksdev backport to v0.18.x

meeseeksmachine pushed a commit to meeseeksmachine/scikit-image that referenced this pull request Jan 31, 2021
hmaarrfk added a commit that referenced this pull request Jan 31, 2021
…7-on-v0.18.x

Backport PR #5197 on branch v0.18.x (Build aarch64 wheels)
@jni
Copy link
Member
jni commented Feb 1, 2021

The backported wheels from #5210 failed to build for 3.9, which means no wheels were uploaded. If anyone has ideas for uploading separate artifacts for each wheel build, please suggest them, because that would save a lot of headaches! Maybe we should separate all these into separate GHA workflows? In the meantime I'm restarting the build. I've saved the log from the failed build here:

https://gist.github.com/jni/63fd707a5e13a15f66a50276def316d8

The error seemed suspicious (below), but the 3.9 wheels built on master so I still hope it's just a sporadic failure.

3.9 wheel test error
2021-01-31T22:20:02.0365971Z =================================== FAILURES ===================================
2021-01-31T22:20:02.0366581Z ____________________ test_multiscale_basic_features_channel ____________________
2021-01-31T22:20:02.0367006Z 
2021-01-31T22:20:02.0367486Z     def test_multiscale_basic_features_channel():
2021-01-31T22:20:02.0368049Z         img = np.zeros((10, 10, 5))
2021-01-31T22:20:02.0368439Z         img[:10] = 1
2021-01-31T22:20:02.0368942Z         img += 0.05 * np.random.randn(*img.shape)
2021-01-31T22:20:02.0369432Z         n_sigmas = 2
2021-01-31T22:20:02.0370096Z         features = multiscale_basic_features(img, sigma_min=1, sigma_max=2, multichannel=True)
2021-01-31T22:20:02.0371521Z         assert features.shape[-1] == 5 * n_sigmas * 4
2021-01-31T22:20:02.0372356Z         assert features.shape[:-1] == img.shape[:-1]
2021-01-31T22:20:02.0373020Z         # Consider last axis as spatial dimension
2021-01-31T22:20:02.0373715Z >       features = multiscale_basic_features(img, sigma_min=1, sigma_max=2)
2021-01-31T22:20:02.0374177Z 
2021-01-31T22:20:02.0375158Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/skimage/feature/tests/test_basic_features.py:28: 
2021-01-31T22:20:02.0376086Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2021-01-31T22:20:02.0377219Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:171: in multiscale_basic_features
2021-01-31T22:20:02.0378347Z     features = list(itertools.chain.from_iterable(all_results))
2021-01-31T22:20:02.0379616Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:159: in <genexpr>
2021-01-31T22:20:02.0380575Z     _mutiscale_basic_features_singlechannel(
2021-01-31T22:20:02.0381892Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:87: in _mutiscale_basic_features_singlechannel
2021-01-31T22:20:02.0382841Z     out_sigmas = list(
2021-01-31T22:20:02.0383732Z /opt/python/cp39-cp39/lib/python3.9/concurrent/futures/_base.py:600: in result_iterator
2021-01-31T22:20:02.0384462Z     yield fs.pop().result()
2021-01-31T22:20:02.0385333Z /opt/python/cp39-cp39/lib/python3.9/concurrent/futures/_base.py:433: in result
2021-01-31T22:20:02.0386036Z     return self.__get_result()
2021-01-31T22:20:02.0386927Z /opt/python/cp39-cp39/lib/python3.9/concurrent/futures/_base.py:389: in __get_result
2021-01-31T22:20:02.0387636Z     raise self._exception
2021-01-31T22:20:02.0388499Z /opt/python/cp39-cp39/lib/python3.9/concurrent/futures/thread.py:52: in run
2021-01-31T22:20:02.0389260Z     result = self.fn(*self.args, **self.kwargs)
2021-01-31T22:20:02.0390406Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:89: in <lambda>
2021-01-31T22:20:02.0391390Z     lambda s: _singlescale_basic_features_singlechannel(
2021-01-31T22:20:02.0392786Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:28: in _singlescale_basic_features_singlechannel
2021-01-31T22:20:02.0393870Z     results += (*_texture_filter(gaussian_filtered),)
2021-01-31T22:20:02.0395057Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:14: in _texture_filter
2021-01-31T22:20:02.0396055Z     eigvals = feature.hessian_matrix_eigvals(H_elems)
2021-01-31T22:20:02.0397267Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/skimage/feature/corner.py:413: in hessian_matrix_eigvals
2021-01-31T22:20:02.0398222Z     return _symmetric_compute_eigenvalues(H_elems)
2021-01-31T22:20:02.0399482Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/skimage/feature/corner.py:275: in _symmetric_compute_eigenvalues
2021-01-31T22:20:02.0401160Z     eigs = np.linalg.eigvalsh(matrices)[..., ::-1]
2021-01-31T22:20:02.0401832Z <__array_function__ internals>:5: in eigvalsh
2021-01-31T22:20:02.0402287Z     ???
2021-01-31T22:20:02.0402651Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2021-01-31T22:20:02.0402939Z 
2021-01-31T22:20:02.0403661Z a = array([[[[[-1.21414661e-04, -1.69277191e-04,  3.27229500e-04],
2021-01-31T22:20:02.0404477Z           [-1.69277191e-04, -6.97374344e-06, -2.1612644...[ 9.68217850e-04, -5.34951687e-05, -3.97205353e-04],
2021-01-31T22:20:02.0405220Z           [ 1.41447783e-03, -3.97205353e-04,  4.82678413e-04]]]]])
2021-01-31T22:20:02.0405747Z UPLO = 'L'
2021-01-31T22:20:02.0405998Z 
2021-01-31T22:20:02.0406495Z     @array_function_dispatch(_eigvalsh_dispatcher)
2021-01-31T22:20:02.0407231Z     def eigvalsh(a, UPLO='L'):
2021-01-31T22:20:02.0407627Z         """
2021-01-31T22:20:02.0408241Z         Compute the eigenvalues of a complex Hermitian or real symmetric matrix.
2021-01-31T22:20:02.0408856Z     
2021-01-31T22:20:02.0409430Z         Main difference from eigh: the eigenvectors are not computed.
2021-01-31T22:20:02.0410002Z     
2021-01-31T22:20:02.0410361Z         Parameters
2021-01-31T22:20:02.0410892Z         ----------
2021-01-31T22:20:02.0411284Z         a : (..., M, M) array_like
2021-01-31T22:20:02.0412112Z             A complex- or real-valued matrix whose eigenvalues are to be
2021-01-31T22:20:02.0412726Z             computed.
2021-01-31T22:20:02.0413394Z         UPLO : {'L', 'U'}, optional
2021-01-31T22:20:02.0414069Z             Specifies whether the calculation is done with the lower triangular
2021-01-31T22:20:02.0415033Z             part of `a` ('L', default) or the upper triangular part ('U').
2021-01-31T22:20:02.0415943Z             Irrespective of this value only the real parts of the diagonal will
2021-01-31T22:20:02.0416902Z             be considered in the computation to preserve the notion of a Hermitian
2021-01-31T22:20:02.0417860Z             matrix. It therefore follows that the imaginary part of the diagonal
2021-01-31T22:20:02.0418584Z             will always be treated as zero.
2021-01-31T22:20:02.0419164Z     
2021-01-31T22:20:02.0419555Z         Returns
2021-01-31T22:20:02.0420148Z         -------
2021-01-31T22:20:02.0420690Z         w : (..., M,) ndarray
2021-01-31T22:20:02.0421372Z             The eigenvalues in ascending order, each repeated according to
2021-01-31T22:20:02.0422081Z             its multiplicity.
2021-01-31T22:20:02.0422622Z     
2021-01-31T22:20:02.0422989Z         Raises
2021-01-31T22:20:02.0423576Z         ------
2021-01-31T22:20:02.0423999Z         LinAlgError
2021-01-31T22:20:02.0424680Z             If the eigenvalue computation does not converge.
2021-01-31T22:20:02.0425265Z     
2021-01-31T22:20:02.0425639Z         See Also
2021-01-31T22:20:02.0426222Z         --------
2021-01-31T22:20:02.0426921Z         eigh : eigenvalues and eigenvectors of real symmetric or complex Hermitian
2021-01-31T22:20:02.0427772Z                (conjugate symmetric) arrays.
2021-01-31T22:20:02.0428491Z         eigvals : eigenvalues of general real or complex arrays.
2021-01-31T22:20:02.0429425Z         eig : eigenvalues and right eigenvectors of general real or complex
2021-01-31T22:20:02.0430080Z               arrays.
2021-01-31T22:20:02.0430855Z         scipy.linalg.eigvalsh : Similar function in SciPy.
2021-01-31T22:20:02.0431468Z     
2021-01-31T22:20:02.0431835Z         Notes
2021-01-31T22:20:02.0432468Z         -----
2021-01-31T22:20:02.0432835Z     
2021-01-31T22:20:02.0433345Z         .. versionadded:: 1.8.0
2021-01-31T22:20:02.0433770Z     
2021-01-31T22:20:02.0434413Z         Broadcasting rules apply, see the `numpy.linalg` documentation for
2021-01-31T22:20:02.0435164Z         details.
2021-01-31T22:20:02.0453382Z     
2021-01-31T22:20:02.0454050Z         The eigenvalues are computed using LAPACK routines ``_syevd``, ``_heevd``.
2021-01-31T22:20:02.0454638Z     
2021-01-31T22:20:02.0455002Z         Examples
2021-01-31T22:20:02.0455698Z         --------
2021-01-31T22:20:02.0456139Z         >>> from numpy import linalg as LA
2021-01-31T22:20:02.0456822Z         >>> a = np.array([[1, -2j], [2j, 5]])
2021-01-31T22:20:02.0457273Z         >>> LA.eigvalsh(a)
2021-01-31T22:20:02.0457736Z         array([ 0.17157288,  5.82842712]) # may vary
2021-01-31T22:20:02.0458107Z     
2021-01-31T22:20:02.0458877Z         >>> # demonstrate the treatment of the imaginary part of the diagonal
2021-01-31T22:20:02.0459732Z         >>> a = np.array([[5+2j, 9-2j], [0+2j, 2-1j]])
2021-01-31T22:20:02.0460154Z         >>> a
2021-01-31T22:20:02.0460722Z         array([[5.+2.j, 9.-2.j],
2021-01-31T22:20:02.0461258Z                [0.+2.j, 2.-1.j]])
2021-01-31T22:20:02.0462074Z         >>> # with UPLO='L' this is numerically equivalent to using LA.eigvals()
2021-01-31T22:20:02.0462670Z         >>> # with:
2021-01-31T22:20:02.0463289Z         >>> b = np.array([[5.+0.j, 0.-2.j], [0.+2.j, 2.-0.j]])
2021-01-31T22:20:02.0463692Z         >>> b
2021-01-31T22:20:02.0464210Z         array([[5.+0.j, 0.-2.j],
2021-01-31T22:20:02.0464592Z                [0.+2.j, 2.+0.j]])
2021-01-31T22:20:02.0465005Z         >>> wa = LA.eigvalsh(a)
2021-01-31T22:20:02.0465467Z         >>> wb = LA.eigvals(b)
2021-01-31T22:20:02.0465857Z         >>> wa; wb
2021-01-31T22:20:02.0466220Z         array([1., 6.])
2021-01-31T22:20:02.0466596Z         array([6.+0.j, 1.+0.j])
2021-01-31T22:20:02.0466957Z     
2021-01-31T22:20:02.0467264Z         """
2021-01-31T22:20:02.0467658Z         UPLO = UPLO.upper()
2021-01-31T22:20:02.0468369Z         if UPLO not in ('L', 'U'):
2021-01-31T22:20:02.0469095Z             raise ValueError("UPLO argument must be 'L' or 'U'")
2021-01-31T22:20:02.0469595Z     
2021-01-31T22:20:02.0470020Z         extobj = get_linalg_error_extobj(
2021-01-31T22:20:02.0470702Z             _raise_linalgerror_eigenvalues_nonconvergence)
2021-01-31T22:20:02.0471424Z         if UPLO == 'L':
2021-01-31T22:20:02.0471925Z             gufunc = _umath_linalg.eigvalsh_lo
2021-01-31T22:20:02.0472420Z         else:
2021-01-31T22:20:02.0472905Z             gufunc = _umath_linalg.eigvalsh_up
2021-01-31T22:20:02.0473372Z     
2021-01-31T22:20:02.0473751Z         a, wrap = _makearray(a)
2021-01-31T22:20:02.0474219Z         _assert_stacked_2d(a)
2021-01-31T22:20:02.0474681Z         _assert_stacked_square(a)
2021-01-31T22:20:02.0475172Z         t, result_t = _commonType(a)
2021-01-31T22:20:02.0475959Z         signature = 'D->d' if isComplexType(t) else 'd->d'
2021-01-31T22:20:02.0476653Z >       w = gufunc(a, signature=signature, extobj=extobj)
2021-01-31T22:20:02.0477447Z E       ValueError: On entry to DSYEVD parameter number 8 had an illegal value
2021-01-31T22:20:02.0477947Z 
2021-01-31T22:20:02.0478864Z /tmp/tmp.sfLxdHN751/venv/lib/python3.9/site-packages/numpy/linalg/linalg.py:1175: ValueError

@hmaarrfk
Copy link
Member
hmaarrfk commented Feb 1, 2021

We could potentially build locally.

I guess the issue with githu actions is that they are tough to run locally.

@jni
Copy link
Member
jni commented Feb 1, 2021

(a) It tragically looks like the error is reproducible:

https://github.com/scikit-image/scikit-image/runs/1803653523?check_suite_focus=true#step:6:596

I wonder if this is an issue with NumPy 1.20, which was just released? They've been making a lot of changes in OpenBLAS which seems to be the source of this error.

(b) @hmaarrfk there's an app for that. =P https://github.com/nektos/act It is onerous enough to set up that I haven't done so yet, but I think I will have to bite the bullet shortly...

@jni
Copy link
Member
jni commented Feb 1, 2021

Ah, I also just noticed (c) actually, the finished workflows do upload wheels anyway, so we have 3.7 and 3.8 aarch wheels, which is nice. But (d) I did bump the version number on the 0.18.x branch after releasing 0.18.1, so we will need to cut a new release once we figure this out. I don't think it's that onerous now that all the kinks have been ironed out. I don't want to cut a new release where we don't release 3.9 Linux wheels, so we have three options:

  • mark that test as xfail for Linux 3.9, backport and release
  • if @janaknat doesn't urgently need 3.9 wheels (?), we can further separate out the aarch and manylinux builds on 3.9, so that the aarch failure doesn't stop the other manylinux wheels from uploading.
  • start nowish with the faster release cycles and release 0.19 shortly. That might still require option 1 to be enacted, but at least prevents a backport cycle.

@jni
Copy link
Member
jni commented Feb 1, 2021

Another observation: the build on master did work, see here:

https://github.com/scikit-image/scikit-image/actions/runs/523589320

that happened prior to the NumPy 1.20 release, and the failure does not appear to happen in skimage code that has changed since 0.18, so that's starting to smell a lot like a NumPy 1.20 issue... I'll be curious to see whether the build fails on the next merge to master or next nightly build.

@hmaarrfk
Copy link
Member
hmaarrfk commented Feb 1, 2021

Strange that it only failed on 3.9.... can the issue be seen on the master branch now?

@janaknat
Copy link
Contributor Author
janaknat commented Feb 1, 2021

@jni It would be good to have python 3.9 wheels. However, it is better to release wheels that work and aim to get 3.9 fixed. Don't most distros ship with python 3.6 - 3.8 as default?

@jni
Copy link
Member
jni commented Feb 1, 2021

Hmm, I thought we had nightly wheel builds but that doesn't seem to have been the case. Anyway, just merged a PR, let's monitor this build for the failure:

https://github.com/scikit-image/scikit-image/actions/runs/529162467

@stefanv
Copy link
Member
stefanv commented Feb 1, 2021

Failure:

  ____________________ test_multiscale_basic_features_channel ____________________
  
      def test_multiscale_basic_features_channel():
          img = np.zeros((10, 10, 5))
          img[:10] = 1
          img += 0.05 * np.random.randn(*img.shape)
          n_sigmas = 2
          features = multiscale_basic_features(img, sigma_min=1, sigma_max=2, multichannel=True)
          assert features.shape[-1] == 5 * n_sigmas * 4
          assert features.shape[:-1] == img.shape[:-1]
          # Consider last axis as spatial dimension
  >       features = multiscale_basic_features(img, sigma_min=1, sigma_max=2)
  
  /tmp/tmp.ZJZYgfG740/venv/lib/python3.9/site-packages/skimage/feature/tests/test_basic_features.py:28: 
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  /tmp/tmp.ZJZYgfG740/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:171: in multiscale_basic_features
      features = list(itertools.chain.from_iterable(all_results))
  /tmp/tmp.ZJZYgfG740/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:159: in <genexpr>
      _mutiscale_basic_features_singlechannel(
  /tmp/tmp.ZJZYgfG740/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:87: in _mutiscale_basic_features_singlechannel
      out_sigmas = list(
  /opt/python/cp39-cp39/lib/python3.9/concurrent/futures/_base.py:600: in result_iterator
      yield fs.pop().result()
  /opt/python/cp39-cp39/lib/python3.9/concurrent/futures/_base.py:433: in result
      return self.__get_result()
  /opt/python/cp39-cp39/lib/python3.9/concurrent/futures/_base.py:389: in __get_result
      raise self._exception
  /opt/python/cp39-cp39/lib/python3.9/concurrent/futures/thread.py:52: in run
      result = self.fn(*self.args, **self.kwargs)
  /tmp/tmp.ZJZYgfG740/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:89: in <lambda>
      lambda s: _singlescale_basic_features_singlechannel(
  /tmp/tmp.ZJZYgfG740/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:28: in _singlescale_basic_features_singlechannel
      results += (*_texture_filter(gaussian_filtered),)
  /tmp/tmp.ZJZYgfG740/venv/lib/python3.9/site-packages/skimage/feature/_basic_features.py:14: in _texture_filter
      eigvals = feature.hessian_matrix_eigvals(H_elems)
  /tmp/tmp.ZJZYgfG740/venv/lib/python3.9/site-packages/skimage/feature/corner.py:413: in hessian_matrix_eigvals
      return _symmetric_compute_eigenvalues(H_elems)
  /tmp/tmp.ZJZYgfG740/venv/lib/python3.9/site-packages/skimage/feature/corner.py:275: in _symmetric_compute_eigenvalues
      eigs = np.linalg.eigvalsh(matrices)[..., ::-1]
  <__array_function__ internals>:5: in eigvalsh
      ???
  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  
  a = array([[[[[-3.51607800e-04, -2.20549107e-03,  1.62541866e-04],
            [-2.20549107e-03, -1.12116337e-04, -9.8598003...[-8.58545303e-04,  6.41047955e-04, -8.41438770e-04],
            [-2.33471394e-04, -8.41438770e-04,  1.06841326e-03]]]]])
  UPLO = 'L'
  
      @array_function_dispatch(_eigvalsh_dispatcher)
      def eigvalsh(a, UPLO='L'):
          """
          Compute the eigenvalues of a complex Hermitian or real symmetric matrix.
      
          Main difference from eigh: the eigenvectors are not computed.
      
          Parameters
          ----------
          a : (..., M, M) array_like
              A complex- or real-valued matrix whose eigenvalues are to be
              computed.
          UPLO : {'L', 'U'}, optional
              Specifies whether the calculation is done with the lower triangular
              part of `a` ('L', default) or the upper triangular part ('U').
              Irrespective of this value only the real parts of the diagonal will
              be considered in the computation to preserve the notion of a Hermitian
              matrix. It therefore follows that the imaginary part of the diagonal
              will always be treated as zero.
      
          Returns
          -------
          w : (..., M,) ndarray
              The eigenvalues in ascending order, each repeated according to
              its multiplicity.
      
          Raises
          ------
          LinAlgError
              If the eigenvalue computation does not converge.
      
          See Also
          --------
          eigh : eigenvalues and eigenvectors of real symmetric or complex Hermitian
                 (conjugate symmetric) arrays.
          eigvals : eigenvalues of general real or complex arrays.
          eig : eigenvalues and right eigenvectors of general real or complex
                arrays.
          scipy.linalg.eigvalsh : Similar function in SciPy.
      
          Notes
          -----
      
          .. versionadded:: 1.8.0
      
          Broadcasting rules apply, see the `numpy.linalg` documentation for
          details.
      
          The eigenvalues are computed using LAPACK routines ``_syevd``, ``_heevd``.
      
          Examples
          --------
          >>> from numpy import linalg as LA
          >>> a = np.array([[1, -2j], [2j, 5]])
          >>> LA.eigvalsh(a)
          array([ 0.17157288,  5.82842712]) # may vary
      
          >>> # demonstrate the treatment of the imaginary part of the diagonal
          >>> a = np.array([[5+2j, 9-2j], [0+2j, 2-1j]])
          >>> a
          array([[5.+2.j, 9.-2.j],
                 [0.+2.j, 2.-1.j]])
          >>> # with UPLO='L' this is numerically equivalent to using LA.eigvals()
          >>> # with:
          >>> b = np.array([[5.+0.j, 0.-2.j], [0.+2.j, 2.-0.j]])
          >>> b
          array([[5.+0.j, 0.-2.j],
                 [0.+2.j, 2.+0.j]])
          >>> wa = LA.eigvalsh(a)
          >>> wb = LA.eigvals(b)
          >>> wa; wb
          array([1., 6.])
          array([6.+0.j, 1.+0.j])
      
          """
          UPLO = UPLO.upper()
          if UPLO not in ('L', 'U'):
              raise ValueError("UPLO argument must be 'L' or 'U'")
      
          extobj = get_linalg_error_extobj(
              _raise_linalgerror_eigenvalues_nonconvergence)
          if UPLO == 'L':
              gufunc = _umath_linalg.eigvalsh_lo
          else:
              gufunc = _umath_linalg.eigvalsh_up
      
          a, wrap = _makearray(a)
          _assert_stacked_2d(a)
          _assert_stacked_square(a)
          t, result_t = _commonType(a)
          signature = 'D->d' if isComplexType(t) else 'd->d'
  >       w = gufunc(a, signature=signature, extobj=extobj)
  E       ValueError: On entry to DSYEVD parameter number 8 had an illegal value

@hmaarrfk
Copy link
Member
hmaarrfk commented Feb 2, 2021

this might be an error in blas or lapack.

Maybe we should skip on aarch64?

@hmaarrfk
Copy link
Member
hmaarrfk commented Feb 2, 2021

We can probably use shippable with


runtime:
    nodePool: shippable_shared_aarch64

to enable aarch64 testing.

@mattip
Copy link
mattip commented Feb 2, 2021

Could you break this out into a stand-alone test that we can run against NumPy? It may be due to the CPU model identification in OpenBLAS failing for qemu, so it would be nice if we could reproduce.

@janaknat
Copy link
Contributor Author

@jni @hmaarrfk Any updates on aarch64 wheels being available on PyPI?

@janaknat
Copy link
Contributor Author

@jni Any updates on scikit-image aarch64 wheels being available on PyPI?

@hmaarrfk
Copy link
Member

Lets see if backporting:
#5243

Improves the builds

@janaknat
Copy link
Contributor Author

@hmaarrfk Any updates on scikit-image arm64 wheels?

@hmaarrfk
Copy link
Member

#5299 is the latest.

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

Successfully merging this pull request may close these issues.

6 participants
0