-
Notifications
You must be signed in to change notification settings - Fork 0
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
Successive use of same UCCDefault
instance adds more passes
#261
Comments
@jordandsullivan and @Misty-W -- I stumbled on this while trying to understand more about the set of default passes. I'm not sure if its actually intended that the passes are modified here, but it seemed surprising on first review. |
So because the intended user interface is Lines 53 to 56 in 1c1b6f1
we didn't consider successive calls to ucc/ucc/transpilers/ucc_defaults.py Lines 37 to 39 in 1c1b6f1
|
I had stumbled on the non- Do we view If we did this way, then the approach linked in the docs for adding additional custom passes would work directly, and I think would match user expectation that an instance of |
Gotcha, yes I agree with that approach. I think it would be more intuitive for contributor-users. |
Addresses #261 by setting up the PassManager in the UCCDefault initializer rather than on each run. The second commit updates the corresponding examples in the docs to reflect current module structure, converts the examples to Sphix doctest to ensure examples we can automate checking they run properly with new code changes, and adds a doctest check to the Test workflow to do that automation.
Describe the bug
Each call to
run
on the same instance ofUCCDefault1
adds additional passes:ucc/ucc/transpilers/ucc_defaults.py
Lines 120 to 124 in 1c1b6f1
To Reproduce
Run the following code
gives output
Expected behavior
I would expect the number of passes to remain fixed between runs, so an output of
The text was updated successfully, but these errors were encountered: