-
Notifications
You must be signed in to change notification settings - Fork 34
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
Build and package Catalyst wheels with OpenMP and ZStd #457
Conversation
40c6a52
to
b46622d
Compare
Thanks @maliasadi! rather than myself reviewing, @mlxd might be a better reviewer here (unless there was something specific you wanted to me check) |
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.
If I understand correctly, we don't ship libomp and zstd together with our package, we only force their installation from the software manager of the underlaying operating system. In this case, Linux systems would probably install the GCC version and MacOS systems the LLVM based one. Am I right?
@rauletorresc We indeed ship Catalyst packages with both |
Would this not conflict/alter/break any previously installed versions of those two libraries at the user's end? |
Quick question, does the PR turn on OpenMP for lightning.kokkos and turn it off for lightning.qubit? This was the conclusion we reached for sensible defaults talking to Lee. Note we should also apply those configuration defaults to our make scripts :) |
@rauletorresc good question! it shouldn't conflict or break any previous version as in previous versions of Catalyst we didn't build our wheels with OMP and Zstd. We enabled them in this PR. |
It turns on OMP for both lightning simulators. But for lighnting.qubit, this OMP support is mainly for the computation of adjoint-jacobian in parallel. @mlxd added a separate flag to enable OMP for gates PennyLaneAI/pennylane-lightning#510 that is turned off by default. But, if we don't want to use adjoint-jacobian with OMP, then we may want to consider using
Sure, will update Makefiles 🙌 |
**Context:** v0.4.1 bugfix PR **Description of the Change:** Incorporates the following PRs: #439 #457 #437 #465 #471 --------- Co-authored-by: David Ittah <dime10@users.noreply.github.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Co-authored-by: Romain Moyard <rmoyard@gmail.com> Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com> Co-authored-by: erick-xanadu <110487834+erick-xanadu@users.noreply.github.com>
On macOS libomp is typically installed via brew, which doesn't make the package discoverable by default to avoid conflicting with a potential GCC installation of OpenMP (not sure that really applies on mac but oh well). This issue was introduced in #457 which setup the proper CMake flag for the wheel recipe but not for local builds.
We now build the Lightning simulator suite with enabling OpenMP and LLVM deps and dialects with ZStd on Linux and macOS. For ABI compatibility, we package our wheels with these libraries and check the hidden deps using
auditwheel
on Linuxdelocate
on macOS[sc-52635]
[sc-52636]