-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add dynamic lapack/openblas lib loading at runtime #653
Conversation
Co-authored-by: Amintor Dusko <[email protected]>
…LaneAI/pennylane-lightning into lightning-qubit2-add-shots
…eAI/pennylane-lightning into lightning-qubit-new-api
…eAI/pennylane-lightning into lightning-qubit-new-api
…y-table and remove std::sort from the logic by re-ordering lookups
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.
Thanks @multiphaseCFD!
Thanks @maliasadi ! According to previous tests, removing the dummy 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.
🥳
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.
Great work! :)
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 thechange, 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:
Switch static LAPACK linking to dynamic loading to LAPACK/OpenBLAS.
Description of the Change:
Deprecated static linking against lapack-dev. Now we load
openblas
libs deployed byscipy
for Hermitian decomposition at runtime.There are two different approaches for
scipy.libs
search depending on how users use/installlightning
SCIPY_LIBS_PATH
macro variable, which is configured at the compile time with the help ofCMAKE
and its built-in variable${Python_SITELIB}
.pip -e .
install: ifSCIPY_LIBS_PATH
doesn't work, we try to usedladdr
to get thepath\ to\ lightning_qubit_ops.so
and we can get\path\to\scipy.libs
withpath\ to\ lightning_qubit_ops.so\..\..\scipy.libs
, given that bothscipy
andlightning
are installed in the samesite-packages
(which should be always true if the env is set up correctly).Benefits:
The licence issue of linking against
lapack-dev
can be avoided.Possible Drawbacks:
Related GitHub Issues: