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

Fixes gpindices initialization issue in TPPOVM. #336

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

sserita
Copy link
Contributor

@sserita sserita commented Aug 10, 2023

Plumbs the 'called_from_reduce' argument of TPPOVM.init into ComplementPOVMEffect and ConjugatedStatePOVMEffect so that effect gpindices aren't allocated during the intialization of a TPPOVM that originates via a reduce call. Also adds logic to BasePOVM to avoid copying effect vectors, which would reset their gpindices and cause allocation down the line. This bugfix may also fix issues with copying TPPOVM objects via, e.g., deepcopy, as this uses the same control path as pickle. Lightly tested on a 1Q TP-parameterized model.

Plumbs the 'called_from_reduce' argument of TPPOVM.__init__ into
ComplementPOVMEffect and ConjugatedStatePOVMEffect so that effect
gpindices aren't allocated during the intialization of a TPPOVM
that originates via a __reduce__ call.  Also adds logic to BasePOVM
to avoid copying effect vectors, which would reset their gpindices
and cause allocation down the line.  This bugfix may also fix issues
with copying TPPOVM objects via, e.g., deepcopy, as this uses the
same control path as pickle.  Lightly tested on a 1Q TP-parameterized
model.
@sserita sserita merged commit 2dbf24f into develop Aug 10, 2023
@sserita sserita deleted the bugfix-tppovm-pickle-gpindices branch August 11, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants