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

Fix macos m1 arm wheel #306

Merged
merged 26 commits into from
Jun 16, 2022
Merged

Fix macos m1 arm wheel #306

merged 26 commits into from
Jun 16, 2022

Conversation

multiphaseCFD
Copy link
Member

@multiphaseCFD multiphaseCFD commented Jun 15, 2022

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    tests directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the .github/CHANGELOG.md file, summarizing the
    change, and including a link back to the PR.

  • Ensure that code is properly formatted by running make format.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context:

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues:

@github-actions
Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit .github/CHANGELOG.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 15, 2022

Test Report (C++) on Ubuntu

           1 files  ±0             1 suites  ±0   1s ⏱️ ±0s
       912 tests ±0         912 ✔️ ±0  0 💤 ±0  0 ±0 
229 195 runs  ±0  229 195 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 9fcafb2. ± Comparison against base commit 34af426.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #306 (9fcafb2) into v0.24_rc0 (34af426) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           v0.24_rc0     #306   +/-   ##
==========================================
  Coverage      99.45%   99.45%           
==========================================
  Files             36       36           
  Lines           3656     3656           
==========================================
  Hits            3636     3636           
  Misses            20       20           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34af426...9fcafb2. Read the comment docs.

@multiphaseCFD multiphaseCFD marked this pull request as ready for review June 16, 2022 13:08
@mlxd mlxd changed the title [WIP] Fix macos m1 arm wheel Fix macos m1 arm wheel Jun 16, 2022
Copy link
Member

@mlxd mlxd left a comment

Choose a reason for hiding this comment

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

Great work @multiphaseCFD
Let's revert that single line change and I'll approve

setup.py Outdated
# Disable OpenMP in M1 Macs
if os.environ.get("USE_OMP"):
configure_args += []
else:
configure_args += ["-DENABLE_OPENMP=OFF"]
configure_args += ["-DENABLE_OPENMP=OFF"]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
configure_args += ["-DENABLE_OPENMP=OFF"]
configure_args += ["-DENABLE_OPENMP=OFF"]

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @mlxd , done!

@@ -61,7 +63,7 @@ jobs:
CIBW_ARCHS_MACOS: ${{ matrix.arch }}

- uses: actions/upload-artifact@v2
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }}
Copy link
Member

Choose a reason for hiding this comment

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

I think we are good, so this can be uncommented.

Copy link
Member Author

Choose a reason for hiding this comment

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

done!

Copy link
Contributor

@isschoch isschoch left a comment

Choose a reason for hiding this comment

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

Worked for my m1 machine! Nice to see arch compatibility problems get fixed 👍

@mlxd mlxd changed the base branch from master to v0.24_rc0 June 16, 2022 13:53
Copy link
Member

@mlxd mlxd left a comment

Choose a reason for hiding this comment

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

💯

Happy to merge once the tests complete.

Copy link
Contributor

@AmintorDusko AmintorDusko left a comment

Choose a reason for hiding this comment

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

Nice work!

@mlxd mlxd merged commit 00841d8 into v0.24_rc0 Jun 16, 2022
@mlxd mlxd deleted the fix_macos_m1_arm_wheel branch June 16, 2022 15:04
maliasadi added a commit that referenced this pull request Jun 20, 2022
* Create RC0

* Update contributors

* Update changelog

* Update pennylane_lightning/_version.py

Co-authored-by: Amintor Dusko <[email protected]>

* Update .github/CHANGELOG.md

Co-authored-by: Chae-Yeun Park <[email protected]>

* Fix macos m1 arm wheel (#306)

* Add IsingXY

* Auto update version

* Trigger CI

* Trigger CI

* Trigger CI

* Trigger CI

* Trigger CI

* Trigger CI

* Trigger CI

* Trigger CI

* make format

* make format

* Delete .DS_Store

.DS_Store deleted

* Delete .DS_Store

* Delete .DS_store

* Delete .DS_Store

* Trigger CI

* fix MacOS ARM64 wheels

* Auto update version

* comment line 66 of wheel_macros_arm64.yml

* uncomment line 66

* Remove space at the end of line 89

Co-authored-by: Dev version update bot <[email protected]>
Co-authored-by: Lee James O'Riordan <[email protected]>

* Trigger docs build

* Fix workflow

* add_isingxy_generator (#307)

* add_isingxy_generator

* Auto update version

* Remove commented lines

* add IsingXY gate to the Python tests

* Statevector vjp and support Hamiltonian in adjoint_jacobian (#294)

* Adding

* Refactoring Algorithms

* Add more test

* Refactor bindings

* Exploring more

* Refactoring JacobianTape...

* C++ test works

* Hamiltonian works in Python

* Refactoring vjp

* Fixing some errors from tests

* Fixing some tests

* New branch from master

* Add tests

* Fix Python test

* Fix test

* Update coverage

* Fix binding dependency

* Fix GBenchmark

* Revert StateVector tests to origin

* Add more tests

* Auto update version

* Fix for tidy

* Update KernelMap

* Fix for codefactor

* Auto update version

* Trigger CI

* Update Memory

* Fix

* Revert single file

* Fix for tidy

* Fixing

* Works

* Works for python tests

* Remove unused file

* Fix some more

* Auto update version

* Trigger CI

* Fix

* Fix for tidy

* Fix for MSVC

* Fix tape trainable_param interface

* Add statevec diff test

* Fixing serialization tests

* Apply suggestions from code reviews

* Update macos target version

* Update MacOS minimum version in CMake

* Update for MacOS

* Revert aligned_alloc for MacOS

* Fix

* Apply suggestions from code review

Co-authored-by: Ali Asadi <[email protected]>

* Apply suggestions from code review

* Test passes

* Update

* Fix

* Fix docstring

* Remove unused dir

* Update

* Fix doc

* Remove BUILD_EXAMPLES option from CMake

* Fix

* Update memory

* Memory works

* Try to use std::aligned_alloc for MacOS

* Revert "Try to use std::aligned_alloc for MacOS"

This reverts commit b2b0035.

* Use C aligned_alloc for MacOs

* Fix for tidy

* Revert to posix_malloc in MacOS

* Update pennylane_lightning/src/simulator/KernelMap.hpp

Co-authored-by: Lee James O'Riordan <[email protected]>

* Update docstring

* Update pennylane_lightning/src/tests/Test_Measures_Sparse.cpp

Co-authored-by: Amintor Dusko <[email protected]>

* Apply suggestions from review

* Auto update version

* Update KernelMap

* Update pennylane_lightning/src/tests/TestKernels.hpp

Co-authored-by: Amintor Dusko <[email protected]>

* Fix tests

* Add Changelog

* Split and add tests for observables

* Auto update version

* Trigger CI

* Trigger CI

* Fix for tidy

* Fix non-const error from clang

* Fix for tidy

* Apply suggestions from code review

Co-authored-by: Lee James O'Riordan <[email protected]>

* Apply suggestions from a code review

* Apply suggestions from code review

Co-authored-by: Amintor Dusko <[email protected]>

* Increase coverage a bit

* Fix

* Fix

* Format

* Add C++ tests for LinearAlgebra

* Format

* Use span for statevector

* Add tests for getObsName

* Format

* More format

* Trigger CI

* Fix

* Fix for tidy

* Add more tests for covergage

* More fix for tidy

* Add more tests for observables

* Fix for tidy

* Add python tests; Use std::span

* Add more tests for codecov

* Add more tests for coverage; Update Makefile

* Fix for tidy

* Fix for tidy

* Clarify documentation on statevector diff; Add tests for complex dy for StateVecAdjDiff

* Apply suggestions from code review; Add some tests

* Update tests/test_adjoint_jacobian.py

Co-authored-by: Amintor Dusko <[email protected]>

* Fix docstring

* Fix doc

* Auto update version

* Update pennylane_lightning/src/algorithms/StateVecAdjDiff.hpp

Co-authored-by: Lee James O'Riordan <[email protected]>

* Fix for invalid trainable_params

* Format

* Fix multithreading hamiltonian expval

* Fix format

* Fix for MacOS?

* Format

* Fix more openmp parallel Hamiltonian computation

* Add complicated Hamiltonian test

* Add changelog

* Apply suggestions from code review

* Fix for tidy

Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Lee James O'Riordan <[email protected]>
Co-authored-by: Amintor Dusko <[email protected]>

Co-authored-by: Dev version update bot <[email protected]>
Co-authored-by: Lee James O'Riordan <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Amintor Dusko <[email protected]>

* Fix docstring

* Update CHANGELOG

* Update doc/conf.py

* Update docs

* Fix Exhale version to 0.3.1

* Update MultiRZ generator

* Update changelog

* Update docs

* Enable KOKKOS

* Update python tests

* Update pennylane_lightning/_version.py

Co-authored-by: Lee James O'Riordan <[email protected]>

Co-authored-by: Amintor Dusko <[email protected]>
Co-authored-by: Chae-Yeun Park <[email protected]>
Co-authored-by: slshu <[email protected]>
Co-authored-by: Lee James O'Riordan <[email protected]>
Co-authored-by: Lee J. O'Riordan <[email protected]>
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.

5 participants