Skip to content
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

Fix unnecessary serialisation of PassManager in serial contexts (backport #12410) #12413

Merged
merged 1 commit into from
May 15, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 15, 2024

Summary

This exposes the interal decision in parallel_map of whether to actually run in serial or not. If not, there's no need for PassManager to side-car its dill serialisation onto the side of the IPC (we use dill because we need to pickle lambdas), which can be an unfortunately huge cost for certain IBM pulse-enabled backends.

Details and comments

@sbrandhsn: as the release manager for 1.1.0, it's up to you whether you want to accept this PR in this form for 1.1.0, or defer to 1.1.1 (you can tag the milestone appropriately). I could also suppress exporting should_run_in_parallel into the public namespace if you're not on board with a new public feature this late into the release cycle.


This is an automatic backport of pull request #12410 done by Mergify.

…2410)

* Fix unnecessary serialisation of `PassManager` in serial contexts

This exposes the interal decision in `parallel_map` of whether to
actually run in serial or not.  If not, there's no need for
`PassManager` to side-car its `dill` serialisation onto the side of the
IPC (we use `dill` because we need to pickle lambdas), which can be an
unfortunately huge cost for certain IBM pulse-enabled backends.

* Remove new function from public API

This makes the patch series safe for backport to 1.1.

(cherry picked from commit b12e9ec)
@mergify mergify bot requested a review from a team as a code owner May 15, 2024 17:39
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@github-actions github-actions bot added Changelog: Bugfix Include in the "Fixed" section of the changelog mod: transpiler Issues and PRs related to Transpiler labels May 15, 2024
@github-actions github-actions bot added this to the 1.1.0 milestone May 15, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9100268257

Details

  • 12 of 12 (100.0%) changed or added relevant lines in 3 files are covered.
  • 27 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.009%) to 89.619%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.02%
qiskit/passmanager/passmanager.py 1 92.63%
crates/qasm2/src/lex.rs 2 92.62%
crates/accelerate/src/euler_one_qubit_decomposer.rs 4 89.68%
crates/qasm2/src/parse.rs 6 97.61%
crates/accelerate/src/sabre/neighbor_table.rs 13 73.13%
Totals Coverage Status
Change from base Build 9087410626: 0.009%
Covered Lines: 62254
Relevant Lines: 69465

💛 - Coveralls

@jakelishman jakelishman added this pull request to the merge queue May 15, 2024
Merged via the queue into stable/1.1 with commit 54059f8 May 15, 2024
18 checks passed
@mergify mergify bot deleted the mergify/bp/stable/1.1/pr-12410 branch May 15, 2024 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog mod: transpiler Issues and PRs related to Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants