-
Notifications
You must be signed in to change notification settings - Fork 79
Add an option to make frontend for not unintalling current environment's PL
#2914
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ RT_BUILD_DIR ?= $(MK_DIR)/runtime/build | |
| OQC_BUILD_DIR ?= $(MK_DIR)/frontend/catalyst/third_party/oqc/src/build | ||
| ENZYME_BUILD_DIR ?= $(MK_DIR)/mlir/Enzyme/build | ||
| COVERAGE_REPORT ?= term-missing | ||
| UNINSTALL_PL ?= ON | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a description and update the |
||
| ENABLE_OPENQASM ?= ON | ||
| ENABLE_OQD ?= OFF | ||
| TEST_BACKEND ?= "lightning.qubit" | ||
|
|
@@ -118,10 +119,14 @@ catalyst: runtime dialects plugin frontend oqc | |
| .PHONY: frontend | ||
| frontend: | ||
| @echo "install Catalyst Frontend" | ||
| ifeq ($(UNINSTALL_PL),ON) | ||
| # Uninstall pennylane before updating Catalyst, since pip will not replace two development | ||
| # versions of a package with the same version tag (e.g. 0.38-dev0). | ||
| $(PYTHON) -m pip uninstall -y pennylane | ||
| $(PYTHON) -m pip install -e . --extra-index-url https://test.pypi.org/simple $(PIP_VERBOSE_FLAG) | ||
| else | ||
| $(PYTHON) -m pip install -e . --no-deps | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mudit2812 I tried locally, Say the current
If we use However, I see the other side too: if a PL branch is too old, it should probably be forwarded by the dev. What do you think?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah now that I think about it, the uninstall step merely forces picking up the exact PL version required by Catalyst when the installed package already has the same version tag (sometimes this happens, same tag, but different code). Disabling this does not affect the case where the installed PL version has a different tag, in which case pip will still look for the one provided by catalyst. The only way around that that I know is Of course if you know what you're doing you can proceed at your own risk, but you don't need a separate flag for that tbh, just run
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had a discussion with @dime10 , and the two most favourable solutions seemed to be the following:
|
||
| endif | ||
| $(PYTHON) -m catalyst.utils.precompile_decomposition_rules | ||
| rm -r frontend/pennylane_catalyst.egg-info | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Thanks for adding this! Slightly clearer naming might be the following, because uninstall sounds like we might plain remove it?