-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unnecessary serialisation of
PassManager
in serial contexts (ba…
…ckport #12410) (#12500) * Fix unnecessary serialisation of `PassManager` in serial contexts (#12410) * 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) # Conflicts: # qiskit/utils/__init__.py # qiskit/utils/parallel.py * solve conflicts * passmanager does not know the cpu_count --------- Co-authored-by: Jake Lishman <[email protected]> Co-authored-by: Luciano Bello <[email protected]>
- Loading branch information
1 parent
4473bbe
commit aa8e9bb
Showing
4 changed files
with
42 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
fixes: | ||
- | | ||
:meth:`.PassManager.run` will no longer waste time serializing itself when given multiple inputs | ||
if it is only going to work in serial. |