Skip to content
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

Implement get_c_interface method for Kokkos plugin #837

Merged
merged 15 commits into from
Aug 7, 2024

Conversation

rauletorresc
Copy link
Contributor

@rauletorresc rauletorresc commented Aug 3, 2024

Context: Catalyst is removing the Kokkos plugin from its code base (PennyLaneAI/catalyst#974) and is attempting to use it directly from Lightning. However, the C interface was not provided via Python.

Description of the Change: Implement the C interface provider method in Python.

Benefits: Catalyst can use the Kokkos plugin.

@rauletorresc rauletorresc requested review from dime10 and a team August 3, 2024 16:01
@rauletorresc rauletorresc self-assigned this Aug 3, 2024
Copy link

codecov bot commented Aug 3, 2024

Codecov Report

Attention: Patch coverage is 21.73913% with 18 lines in your changes missing coverage. Please review.

Project coverage is 80.99%. Comparing base (619b807) to head (ac9d74f).

Files Patch % Lines
...ane_lightning/lightning_kokkos/lightning_kokkos.py 18.18% 18 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (619b807) and HEAD (ac9d74f). Click for more details.

HEAD has 89 uploads less than BASE
Flag BASE (619b807) HEAD (ac9d74f)
97 8
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #837       +/-   ##
===========================================
- Coverage   98.53%   80.99%   -17.55%     
===========================================
  Files         116       17       -99     
  Lines       18510     1936    -16574     
===========================================
- Hits        18239     1568    -16671     
- Misses        271      368       +97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rauletorresc rauletorresc force-pushed the raultorres/kokkos_get_c_interface branch from 7a66cb2 to 120962b Compare August 3, 2024 17:24
@rauletorresc rauletorresc marked this pull request as ready for review August 3, 2024 17:31
@rauletorresc rauletorresc force-pushed the raultorres/kokkos_get_c_interface branch from c39d1cd to 6d7d6a3 Compare August 4, 2024 18:37
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rauletorresc for adding the missing get_c_interface method to LK 💯

pennylane_lightning/lightning_kokkos/lightning_kokkos.py Outdated Show resolved Hide resolved
pennylane_lightning/lightning_kokkos/lightning_kokkos.py Outdated Show resolved Hide resolved
pennylane_lightning/lightning_kokkos/lightning_kokkos.py Outdated Show resolved Hide resolved
pennylane_lightning/lightning_kokkos/lightning_kokkos.py Outdated Show resolved Hide resolved
Copy link
Contributor

@vincentmr vincentmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise looks good to me. Some tests would be nice if possible as pointed out by @maliasadi . Ping me again for another round of reviews.

pennylane_lightning/lightning_kokkos/lightning_kokkos.py Outdated Show resolved Hide resolved
@rauletorresc rauletorresc force-pushed the raultorres/kokkos_get_c_interface branch from 39ca4ad to 6e2fca1 Compare August 6, 2024 01:59
@rauletorresc rauletorresc added the ci:build_wheels Activate wheel building. label Aug 6, 2024
@rauletorresc rauletorresc force-pushed the raultorres/kokkos_get_c_interface branch 2 times, most recently from 74298ff to f72140e Compare August 6, 2024 20:34
@rauletorresc rauletorresc force-pushed the raultorres/kokkos_get_c_interface branch 2 times, most recently from ba1fb09 to cdb46a7 Compare August 7, 2024 01:40
@rauletorresc rauletorresc force-pushed the raultorres/kokkos_get_c_interface branch 6 times, most recently from 7f5de01 to d00bd5a Compare August 7, 2024 03:34
@rauletorresc rauletorresc force-pushed the raultorres/kokkos_get_c_interface branch from d00bd5a to 181daf2 Compare August 7, 2024 03:48
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @rauletorresc!

Copy link
Contributor

@vincentmr vincentmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @rauletorresc !

@rauletorresc rauletorresc merged commit 8f517d2 into master Aug 7, 2024
90 of 92 checks passed
@rauletorresc rauletorresc deleted the raultorres/kokkos_get_c_interface branch August 7, 2024 17:45
rauletorresc added a commit to PennyLaneAI/catalyst that referenced this pull request Aug 8, 2024
**Context:** Lightning Kokkos plugin has been migrated to Lightning. We
can remove its code from Catalyst then. But this PR in Lightning must be
approved first:
PennyLaneAI/pennylane-lightning#837

**Description of the Change:** Remove plugin from code and from the list
of provided plugins.

**Benefits:** Remove duplicated functionality.

[sc-69450]

---------

Co-authored-by: David Ittah <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:build_wheels Activate wheel building.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants