-
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
Refactor cuda_utils : move custatevec to lightning_gpu_utils #681
Conversation
Hello. You may have forgotten to update the changelog!
|
* collapse() and normalized() with Kokkos * Auto update version * CodeFactor * normalize() abort if norm is zero * unittest for normalize() * Auto update version * unittest for normalize() in LighningQubit * Auto update version * Add MCM bindings and tests for L-Kokkos. (#672) * Add MCM bindings and tests for L-Kokkos. * Auto update version * Refactor collapse. * Try parallelizing tests. * Only run test_native_mcm once amongst all workflows since it takes quite a bit of time. * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> * Do not run test_native_mcm with LK-GPU. * Auto update version * trigger ci * Update pennylane_lightning/core/src/simulators/lightning_kokkos/bindings/LKokkosBindings.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Auto update version * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> * Increase shotsfor flaky test_composite_mcm_single_measure_obs * Create separate device_allowed_operations list for ops supported by the device but not Catalyst. * Use isinstance instead of name comparison. * Check projector. * Update operations at device init. * Modify stopping condition in LK. * Cannot use instance with Hamiltonian check. * Update pennylane_lightning/core/src/simulators/lightning_kokkos/tests/Test_StateVectorLKokkos.cpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Update pennylane_lightning/core/src/simulators/lightning_kokkos/StateVectorKokkos.hpp Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com> * Remove obsolete comment. * Auto update version * trigger ci --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Vincent Michaud-Rioux <vincent.michaud-rioux@xanadu.ai> Co-authored-by: Vincent Michaud-Rioux <vincentm@nanoacademic.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Co-authored-by: Amintor Dusko <87949283+AmintorDusko@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #681 +/- ##
==========================================
+ Coverage 98.68% 99.12% +0.43%
==========================================
Files 172 208 +36
Lines 22544 27607 +5063
==========================================
+ Hits 22248 27365 +5117
+ Misses 296 242 -54 ☔ View full report in Codecov by Sentry. |
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.
Looks good so far, I left some suggestions.
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp
Outdated
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.
Not blocking, but a few performance considerations/suggestions. Happy to approve otherwise.
I would not be worried about things happening on device initialization, but things getting called in a loop over operations could pile up for smallish circuits.
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.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.
🙌
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVecError.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_gpu/utils/cuStateVec_helpers.hpp
Show resolved
Hide resolved
…StateVecError.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…StateVecError.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…StateVec_helpers.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…StateVecError.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…StateVec_helpers.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…StateVec_helpers.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
…StateVecError.hpp Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com>
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.
Nice job! Thank you for that!
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:
Remove
cuda_utils
's dependency oncustatevec.h
.Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: