-
Notifications
You must be signed in to change notification settings - Fork 27
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
[Frontend][Runtime] A plugin system for the backend devices #343
Conversation
d04e580
to
b53a55e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #343 +/- ##
==========================================
- Coverage 99.63% 99.44% -0.20%
==========================================
Files 44 42 -2
Lines 7731 6981 -750
Branches 467 467
==========================================
- Hits 7703 6942 -761
- Misses 14 23 +9
- Partials 14 16 +2 ☔ 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 on my end, however I only reviewed the documentation so would still need additional technical review :)
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.
Only some initial comments from a quick fly by so far, but I'm excited about merging this in 🤩
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.
Great work 🥳 I just left some improvements to the documentation to be more specific and that should hopefully make it very clear how to create a custom device for third parties.
…mDevice constructor and extract_backend_info
Description of the Change:
rtd_name
,rtd_lib
,rtd_kwargs
) representing the device name, the shared library path, and other specifications (number of shots, S3, ARN, etc.) from the frontend to the backend.runtime.py
.gcov
Performance:
The new plugin system of Catalyst is backed by
dlopen
to load libraries at runtime instead of linking them at compile time. This approach may introduce negligible overhead depending on your QJIT workflow. I only observed a slight slowdown when loading multiple devices at runtime inside a JIT-decorated workflow.Running all frontend tests on a
c5.9xlarge
machine,Without the plugin system (
backend='lightning.qubit'
):With the plugin system (
backend='lightning.qubit'
):Note that to support the plugin system on CIs, a few frontend tests were skipped. I also skipped those tests in the benchmark.
[sc-46412]