-
Notifications
You must be signed in to change notification settings - Fork 58
Use transform pass name #2206
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
base: main
Are you sure you want to change the base?
Use transform pass name #2206
Conversation
| """ | ||
|
|
||
| if fn.mlir_module is not 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.
Just switching to using a guard clause here. No actual code changes, but made it easier to scan the source code and see what was happening.
|
Hello. You may have forgotten to update the changelog!
|
|
Did you accidentally commit the intermediates? 😅 |
looks like yes ... |
**Context:** Trying to improve our integration between pennylane transforms and catalyst passes. See #2206 for where we are able to update all built-in catalyst passes to be transforms instead. That PR helps validate we can make this change with no breaking behaviour. Going forward, we can setup a plan to get rid of the catalyst-specific pass handling infrastructure. Also note that this PR targets the PennyLane branch, so we can confirm we won't need anymore changes there to get catalyst working correctly before approving and merging. **Description of the Change:** Uses the `transform.pass_name` property as the higher priority source of the `pass_name`. Updates the `pass_pipeline` from the `quantum_kernel_p` primitive to be a tuple of `TransformContainer` objects instead of `Pass`, but leaves in the logic to handle `tuple[Pass,...]` for safer backwards compatibility. Also makes using transforms with pass names by splitting a `QNode`'s transform program into "things at the start of the program that are tape transforms" and "things at the end of the program that are MLIR passes". This will allow us to get rid of `PassPipelineWrapper` use for both systems and soften the change from old frontend to new frontend. **Benefits:** Unified handling of transforms across pennylane and catalyst. **Possible Drawbacks:** **Related GitHub Issues:** Depends on PennyLaneAI/pennylane#8539 [sc-103775] --------- Co-authored-by: Paul <[email protected]>
Context:
In #2149 I'm integrating transforms with passes names with the infrastructure so that we can replace the Catalyst
Passinstracture with a unified transform handling ecosystem.In order to test this integration, I'm just switching the passes over to use the transform instructure.
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: