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 regression on gufunc serialization #6826
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch, couple of comments to address else looks good.
dct = dict( | ||
py_func=gb.py_func, | ||
signature=gb.signature, | ||
identity=self._identity, | ||
cache=gb.cache, | ||
is_dynamic=self._is_dynamic, | ||
targetoptions=gb.targetoptions, | ||
typesigs=gb._sigs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think self._frozen
should be in here, it is transmittable state and should prevent further compilation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
got = np.zeros_like(arr) | ||
double(arr, out=expect) | ||
cloned(arr, out=got) | ||
self.assertPreciseEqual(expect, got) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if these tests ought to also check, self._frozen
, self.gufunc_builder._sigs
, self._is_dynamic
and self._identity
, just to make sure the state is carrying appropriately?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These attributes are now tested explicitly
# expected value of attributes | ||
self.assertTrue(cloned._frozen) | ||
|
||
cloned.disable_compile() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this has any effect but is harmless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch and fixes, looks good.
Fix regression on gufunc serialization (cherry picked from commit 056bf6b)
Fixes #6821.