-
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
Add Catalyst specific Lightning Kokkos class #770
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #770 +/- ##
==========================================
- Coverage 94.32% 87.09% -7.24%
==========================================
Files 109 74 -35
Lines 15783 11152 -4631
==========================================
- Hits 14888 9713 -5175
- Misses 895 1439 +544 ☔ View full report in Codecov by Sentry. |
Catalyst files were moved from here. Edit: Catalyst files also needed some format updates. |
Tests are still needed. |
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 @AmintorDusko , not much in the way of this PR, I wrote some thoughts for future work as suggestions.
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosObsManager.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosObsManager.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Show resolved
Hide resolved
…neAI/pennylane-lightning into add/rtd_lightning_kokkos
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.
Thank you @AmintorDusko! 🎸
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosObsManager.hpp
Show resolved
Hide resolved
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 folks. I have a few questions, but given the size we can explicit backlog anything that's needed.
Though, are we expecting the Kokkos data to work with a CUDA backend, as well as an OpenMP? Given we are using std::vector of kokkos complex in some places, I wonder if this will cause issues.
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosObsManager.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Show resolved
Hide resolved
...ghtning/core/src/simulators/lightning_kokkos/catalyst/tests/Test_LightningKokkosGradient.cpp
Show resolved
Hide resolved
...htning/core/src/simulators/lightning_kokkos/catalyst/tests/Test_LightningKokkosSimulator.cpp
Show resolved
Hide resolved
...htning/core/src/simulators/lightning_kokkos/catalyst/tests/Test_LightningKokkosSimulator.cpp
Show resolved
Hide resolved
...htning/core/src/simulators/lightning_kokkos/catalyst/tests/Test_LightningKokkosSimulator.cpp
Show resolved
Hide resolved
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.
Since this essentially moves the files over there is not much for me to review, it is better if lightning maintainers give it a good review from their perspective. I've answered all the questions I could however.
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/CMakeLists.txt
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosObsManager.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosObsManager.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_kokkos/catalyst/LightningKokkosSimulator.cpp
Show resolved
Hide resolved
...ghtning/core/src/simulators/lightning_kokkos/catalyst/tests/Test_LightningKokkosGradient.cpp
Show resolved
Hide resolved
...htning/core/src/simulators/lightning_kokkos/catalyst/tests/Test_LightningKokkosSimulator.cpp
Show resolved
Hide resolved
...htning/core/src/simulators/lightning_kokkos/catalyst/tests/Test_LightningKokkosSimulator.cpp
Show resolved
Hide resolved
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.
Thanks @AmintorDusko , I just have a question about the change log.
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.
Massive PR! Looks good to me, thanks @AmintorDusko .
… We make a small update to track these changes. The Catalyst PR adds seeding to qjit: PennyLaneAI/catalyst#936
### Before submitting Please complete the following checklist when submitting a PR: - [x] 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`](../tests) directory! - [x] 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`. - [x] Ensure that the test suite passes, by running `make test`. - [x] Add a new entry to the `.github/CHANGELOG.md` file, summarizing the change, and including a link back to the PR. - [x] 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:** The lightning kokkos files in the Catalyst repo has changed since #770. We make a small update to track these changes. The Catalyst PR that made the changes added seeding to qjit: PennyLaneAI/catalyst#936 **Description of the Change:** The `lightning_kokkos/catalyst` files now has the MCM seeding support added in catalyst PennyLaneAI/catalyst#936 **Benefits:** unblocks kokkos with catalyst **Possible Drawbacks:** None **Related GitHub Issues:** None --------- Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai>
Context: Catalyst needs to build a class wrapping the Lightning Kokkos class. Here we are moving the logic from Catalyst to the Lightning repository.
Description of the Change: Moving code from Catalyst to this repository and updating the build system to build against Catalyst.
Benefits: Catalyst wheels will build faster.
Possible Drawbacks: Our build system now relies on headers coming from Catalyst. It is unclear if this may cause a deadlock in the future because of our cyclic dependencies (PennyLane, PennyLane Lightning, Catalyst). Chances are small because we don't rely on Catalyst wheels or build it from scratch.
Usage: This PR offers three ways to configure the CMake building system:
cmake -BBuildTests -G Ninja \ -DCMAKE_INSTALL_PREFIX=$path_to_kokkos \ -DCATALYST_GIT_TAG=main \ -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_TESTS=ON \ -DENABLE_WARNINGS=ON \ -DPL_BACKEND=lightning_kokkos
cmake -BBuildTests -G Ninja \ -DCMAKE_INSTALL_PREFIX=$path_to_kokkos \ -DCMAKE_BUILD_TYPE=Debug \ -DBUILD_TESTS=ON \ -DENABLE_WARNINGS=ON \ -DPL_BACKEND=lightning_kokkos
Check out ADR 76 for alternative approaches.
[sc-59312]