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

Mac M1 Support #395

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Mac M1 Support #395

wants to merge 5 commits into from

Conversation

itsjohnward
Copy link

@itsjohnward itsjohnward commented Dec 31, 2021

Incorporated @NikZak's suggestion from #385 (comment) and also removed the emmintrin header on arm64 ARM per https://reviews.llvm.org/D109686#change-qMIOtz4d3wgp.

Tested like so:

$ SDKROOT=$(xcrun --sdk macosx --show-sdk-path) pip install -e .[test] && pytest .
...
===================================== test session starts ======================================
platform darwin -- Python 3.9.9, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/john/bottleneck, configfile: setup.cfg
plugins: hypothesis-6.34.1
collected 209 items                                                                            

bottleneck/tests/input_modification_test.py .............................                [ 13%]
bottleneck/tests/list_input_test.py .............................                        [ 27%]
bottleneck/tests/memory_test.py .                                                        [ 28%]
bottleneck/tests/move_test.py .................................                          [ 44%]
bottleneck/tests/nonreduce_axis_test.py .........................                        [ 55%]
bottleneck/tests/nonreduce_test.py ..............                                        [ 62%]
bottleneck/tests/reduce_test.py ........................................................ [ 89%]
...                                                                                      [ 90%]
bottleneck/tests/scalar_input_test.py ..................                                 [ 99%]
bottleneck/tests/test_template.py .                                                      [100%]

======================================= warnings summary =======================================
bottleneck/tests/scalar_input_test.py::test_scalar_input[ss]
  /Users/john/bottleneck/bottleneck/slow/reduce.py:87: RuntimeWarning: overflow encountered in multiply
    y = np.multiply(a, a).sum(axis)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=============================== 209 passed, 1 warning in 32.31s ================================

@rdbisme
Copy link
Collaborator

rdbisme commented Feb 23, 2022

Hello, thanks. It would be great if you could rebase this on the new master. I think a dependency on this might be to have aarch64 and arm7v CI tests.

@ahysing
Copy link

ahysing commented Aug 3, 2022

Hi guys. I hope we can this one done and merged. Support for apple silicon is becoming more and more important. I looked at @rdbisme comment. I agree. CI tests are important. However GitHub actions is not planning ARM64 support actions/runner-images#2187

can we imagine cross compiling on AMD64 for ARM64? I want to explore all options at this point.

@rdbisme
Copy link
Collaborator

rdbisme commented Aug 11, 2022

Hi guys. I hope we can this one done and merged. Support for apple silicon is becoming more and more important. I looked at @rdbisme comment. I agree. CI tests are important. However GitHub actions is not planning ARM64 support actions/runner-images#2187

can we imagine cross compiling on AMD64 for ARM64? I want to explore all options at this point.

I think there are two solutions:

  • Crosscompiling (not sure there's something established enough that allows easy cross-compile of python packages)
  • Build the package under KVM / Qemu. I think I saw some Github actions using this approach.

I'm not a ninja with Github Actions, but I think I might make this work on Gitlab CI. If anyone has any inputs, feel free to contribute to the discussion.

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.

3 participants