-
Notifications
You must be signed in to change notification settings - Fork 40
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
Update unit/integration tests for the new device #840
Update unit/integration tests for the new device #840
Conversation
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## kokkosNewAPI_backend #840 +/- ##
========================================================
+ Coverage 67.08% 73.00% +5.92%
========================================================
Files 20 20
Lines 2297 2297
========================================================
+ Hits 1541 1677 +136
+ Misses 756 620 -136 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Vincent Michaud-Rioux <[email protected]>
Co-authored-by: Amintor Dusko <[email protected]>
pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append | ||
pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append |
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.
All the PL base tests now are uncomment for CI with GitHub Actions
@@ -431,7 +431,7 @@ class LightningKokkos(Device): | |||
# pylint: disable=too-many-instance-attributes | |||
|
|||
# General device options | |||
_device_options = ("rng", "c_dtype", "batch_obs") |
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.
Remove numpy
random generator from the device option. This is only applicable to MCMC
# It is necessary to set the mcmc default configuration to complete the requirements of ExecuteConfig | ||
mcmc_default = {"mcmc": False, "kernel_name": None, "num_burnin": 0, "rng": None} |
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.
Setting the mcmc
default values in a hardcode way to avoid complaints from PL-base and prevent user modify
if device_name == "lightning.kokkos": | ||
pytest.skip("Kokkos new API in WIP. Skipping.", allow_module_level=True) | ||
|
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.
All the unit / integration tests now are uncommented to check the functionality of the new device API with Kokkos
Co-authored-by: Amintor Dusko <[email protected]>
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 for that!
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! 🎉
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:
Migrate the lightning.kokkos device to the new device API.
Description of the Change:
Unlock and modify all the unit tests for
Lightning Kokkos
and pass all the CI.Benefits:
Integration of LighntingKokkos with the new device API.
Possible Drawbacks:
Related GitHub Issues:
Partial / Freezzed PR⚠️ ❄️
To make a smooth integration of LightningKokkos with the new device API, we set the branch
kokkosNewAPI_backend
as the base branch target for this development.The branch
kokkosNewAPI_backend
has the mock of all classes and methods necessary for the new API. Also, several tests were disabled withAdditionally, the CI testing from PennyLane for LKokkos is temporally disabled through commenting on the following lines in .github/workflows files
However, these tests will unblocked as the implementation progresses.
After all the developments for integrating LightningKokkos with the new API have been completed then the PR will be open to merging to master
[sc-68823]