-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[runtime][python] Fix device array deepcopy when not mappable
If the device array is not mappable to the host the deepcopy would fail and result in an exception. To mitigate this in case it is not mappable we copy. Implement the __deepcopy__ to avoid double copy when not mappable. If deepcopy is done through __reduce__ then once we would copy form device to host and another time inside the deepcopy implementation. Signed-off-by: Boian Petkantchin <[email protected]>
- Loading branch information
Showing
2 changed files
with
17 additions
and
5 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