-
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.
Manage edge case of pickling instmap. (#9487)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 8af4045)
- Loading branch information
1 parent
aaf9975
commit 3eeaf70
Showing
3 changed files
with
44 additions
and
0 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
12 changes: 12 additions & 0 deletions
12
releasenotes/notes/fix-instmap-add-with-arguments-250de2a7960565dc.yaml
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,12 @@ | ||
--- | ||
fixes: | ||
- | | ||
An edge case of pickle :class:`.InstructionScheduleMap` with | ||
non-picklable iterable ``arguments`` is supported. | ||
When :meth:`InstructionScheduleMap.add` is called with | ||
``arguments``, this method typecasts the user value to a python list | ||
to guarantee the added entry is picklable. | ||
For example, a user may supply a python dict keys as ``arguments``. | ||
This also guarantees parallel transpile works with such a custom | ||
instruction schedule map, where the map object is pickled and | ||
distributed to every parallel threads. |
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