-
Notifications
You must be signed in to change notification settings - Fork 39
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
[WIP] setup.py uses CMake #176
Conversation
…htning into cmake_setup_py
Codecov Report
@@ Coverage Diff @@
## master #176 +/- ##
===========================================
- Coverage 100.00% 92.97% -7.03%
===========================================
Files 4 4
Lines 184 185 +1
===========================================
- Hits 184 172 -12
- Misses 0 13 +13
Continue to review full report at Codecov.
|
e4b68f0
to
23b61fe
Compare
Windows tests fail as python does not find a correct DLL path. https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew can be a reason? |
It may also be worth enabling the CI wheel builders to export the built wheels for this PR (they are normally disabled outside master). As a quick workaround, we can remove this line:
and re-add it after we pull down the wheel. Same as for Mac x86_64 and M1 (to verify OpenMP no longer fails). |
See https://github.com/PennyLaneAI/pennylane-lightning/actions/runs/1467603819 and https://github.com/PennyLaneAI/pennylane-lightning/actions/runs/1467603816 |
Hi @chaeyeunpark I had time to compare the wheels on Python3.9 for Linux. The performance is pretty much the same for both (nice work on that). I did notice that the size of the wheels, as well as the exported symbols, differ between the current version and this version. I think for now to minimize the differences we can add some additional compile-time flags that are turned on by-default for the Linux/Mac setuptools versions:
I think this should be enough to get an almost apples-to-apples binary comparison. With the above changes, and disabling the wheels being stored, I am happy to see this being merged in. I suspect the CodeCov issue will resolve itself too with another commit. If not, we can see about whether it makes sense to add another test, or just override its complaint. |
Hi @mlxd, I made those changes https://github.com/PennyLaneAI/pennylane-lightning/pull/176/files#diff-f8588b38421f6ebc8fdb5eaaca2d2a160b4e38a5092a2ffa045f7cd5075823eaR10-R17. However, tests still fail (probably because of the new Pennylane features). We may merge this after #179 is merged. |
Awesome work! Thanks @chaeyeunpark |
Fixed --build options
Nice work @chaeyeunpark! PR #179 is also merged. |
Updated install guide for development setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Chae-Yeun, I added two more comments. Happy to merge after these are addressed.
.github/workflows/wheel_noarch.yml
Outdated
@@ -19,6 +19,9 @@ jobs: | |||
with: | |||
python-version: '3.7' | |||
|
|||
- name: Get latest CMake and ninja | |||
uses: lukka/get-cmake@latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to prefer this over a pip installation of both cmake and ninja?
if platform.system() == "Windows" and sys.version_info[:2] >= (3, 8): | ||
# Add the current directory to DLL path. | ||
# See https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew | ||
os.add_dll_directory(os.path.dirname(os.path.abspath(__file__))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can add a Pylint ignore comment here to ignore the warnings. Or, should we add tests as recommended?
This reverts commit 19a8a85.
setup.py
is rewritten to use CMake.