-
Notifications
You must be signed in to change notification settings - Fork 59
Make all xDSL passes visible to the compiler #2322
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2322 +/- ##
==========================================
- Coverage 97.28% 97.10% -0.18%
==========================================
Files 107 107
Lines 12946 12947 +1
Branches 1076 1076
==========================================
- Hits 12594 12572 -22
- Misses 290 308 +18
- Partials 62 67 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…/catalyst into xdsl-pass-visibility
frontend/test/pytest/python_interface/transforms/quantum/test_xdsl_parity_synth.py
Show resolved
Hide resolved
andrijapau
left a comment
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!
sengthai
left a comment
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! Thanks @mudit2812
Context:
Currently, trying to apply xDSL passes using
@catalyst.apply_pass("my-pass")or@qml.transform(pass_name="my-pass")doesn't work for the passes incatalyst.python_interface.transformsbecause their files do not get collected unless something from that module is imported. This PR makes sure that the global xDSL pass registry is up-to-date before QJIT workflows are lowered to MLIR.Description of the Change:
XDSL_UNIVERSEwhen lowering transforms programs totransform.named_sequence. TheXDSL_UNIVERSEis a data structure that collects all dialects and transforms into a single entry point. This makes sure that the transforms get imported, and consequently, registered.requirements.txtto install filecheckBenefits:
Possible Drawbacks:
catalyst/python_interface/transforms/__init__.py. But, there are probably not any other cases in which we would want to use a transform that has not been directly or indirectly imported.Related GitHub Issues:
[sc-106692]