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

Improve installation supports with external builds #403

Merged
merged 17 commits into from
Feb 1, 2023
Merged

Conversation

mlxd
Copy link
Member

@mlxd mlxd commented Jan 23, 2023

Context: The CMake build system, and associated targets, do not fully conform to a CMake installation step. As such, to allow better reproducibility across builds, and integration with platforms such as spack, we need to make some adjustments to best support this.

Description of the Change: Change benchmark and test target names, macro variable usage and header visibility. Running cmake --install ./build following a compilation step will now install the headers and compiled binaries into a predefined target location with bin include and lib directories.

Benefits: Enables better support for installation of lightning targets, headers, and spack integration.

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.

@mlxd mlxd changed the title Add better supports for cmake installation of binary targets. Improve installation supports with external builds Jan 30, 2023
@mlxd mlxd marked this pull request as ready for review January 30, 2023 22:44
@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Merging #403 (d86e7d8) into master (7a36b4c) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #403   +/-   ##
=======================================
  Coverage   99.88%   99.88%           
=======================================
  Files          49       49           
  Lines        4463     4463           
=======================================
  Hits         4458     4458           
  Misses          5        5           
Impacted Files Coverage Δ
pennylane_lightning/_serialize.py 100.00% <ø> (ø)
pennylane_lightning/src/util/LinearAlgebra.hpp 100.00% <ø> (ø)
pennylane_lightning/_version.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@chaeyeunpark chaeyeunpark left a comment

Choose a reason for hiding this comment

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

First iteration. Looks good so far.

Copy link
Member

@multiphaseCFD multiphaseCFD left a comment

Choose a reason for hiding this comment

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

Thanks @mlxd for the nice work and looks nice for me.

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 so far!

CMakeLists.txt Show resolved Hide resolved
@vincentmr
Copy link
Contributor

Hi @mlxd, looks good to me. I'm wondering, why did the benchmarks and tests got renamed with the pennylane_lightning_ prefix?

@mlxd
Copy link
Member Author

mlxd commented Jan 31, 2023

Hi @mlxd, looks good to me. I'm wondering, why did the benchmarks and tests got renamed with the pennylane_lightning_ prefix?

Thanks @vincentmr. With this update, we have the option to install the built binaries into a given prefix path from CMake, and for our updates to support spack. If we installed our test runner (previously named runner) into a /usr/local/bin directory, it would be very ambiguous what it is doing (the same with the benchmarking binary). The naming update was to avoid conflicting with any other packages that have similarly named binaries, by prepending our package name to the binary names.

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.

Thank you for that!

@AmintorDusko
Copy link
Contributor

Hey @mlxd, black just released its new version. Before merging, please update black locally and run:
black -l 100 ./pennylane_lightning/ ./tests

@mlxd
Copy link
Member Author

mlxd commented Feb 1, 2023

black -l 100 ./pennylane_lightning/ ./tests

Done. Will merge after the CI passes

2 similar comments
@mlxd
Copy link
Member Author

mlxd commented Feb 1, 2023

black -l 100 ./pennylane_lightning/ ./tests

Done. Will merge after the CI passes

@mlxd
Copy link
Member Author

mlxd commented Feb 1, 2023

black -l 100 ./pennylane_lightning/ ./tests

Done. Will merge after the CI passes

@mlxd mlxd merged commit 7a14f88 into master Feb 1, 2023
@mlxd mlxd deleted the update_cmake_install branch February 1, 2023 20:42
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