-
Notifications
You must be signed in to change notification settings - Fork 41
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
Optimize gate cache recording for lightning.tensor
#879
Conversation
Hello. You may have forgotten to update the changelog!
|
lightning.tensor
gate cache access modelightning.tensor
gate cache access mode
lightning.tensor
gate cache access modelightning.tensor
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #879 +/- ##
===========================================
- Coverage 98.35% 85.13% -13.22%
===========================================
Files 117 59 -58
Lines 19405 5154 -14251
===========================================
- Hits 19086 4388 -14698
- Misses 319 766 +447 ☔ 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.
Nice improvement! 💯
pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/gates/TNCudaGateCache.hpp
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/gates/TNCudaGateCache.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.
LGTM Thank you @multiphaseCFD. Just a few comments
pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/TNCudaBase.hpp
Outdated
Show resolved
Hide resolved
pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/TNCudaBase.hpp
Outdated
Show resolved
Hide resolved
…a/TNCudaBase.hpp Co-authored-by: Luis Alfredo Nuñez Meneses <alfredo.nunez@xanadu.ai>
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.
LGTM! Thank you @multiphaseCFD just one last comment 😄
pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/TNCudaBase.hpp
Outdated
Show resolved
Hide resolved
…a/TNCudaBase.hpp Co-authored-by: Luis Alfredo Nuñez Meneses <alfredo.nunez@xanadu.ai>
### 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`](../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`. - [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:** [SC-72517] Current implementation of `applyOperation` avoid the overhead of a `cutensornetStateUpdateTensorOperator` call and the creation of a new `DataBuffer` object. A new `gate_ids_` private data is added for the quick generation of a new key, which does not exist in the `gate_cache`. **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai> Co-authored-by: Luis Alfredo Nuñez Meneses <alfredo.nunez@xanadu.ai>
### 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`](../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`. - [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:** [SC-72517] Current implementation of `applyOperation` avoid the overhead of a `cutensornetStateUpdateTensorOperator` call and the creation of a new `DataBuffer` object. A new `gate_ids_` private data is added for the quick generation of a new key, which does not exist in the `gate_cache`. **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** --------- Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai> Co-authored-by: Luis Alfredo Nuñez Meneses <alfredo.nunez@xanadu.ai>
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:
[SC-72517]
Current implementation of
applyOperation
avoid the overhead of acutensornetStateUpdateTensorOperator
call and the creation of a newDataBuffer
object. A newgate_ids_
private data is added for the quick generation of a new key, which does not exist in thegate_cache
.Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: