Skip to content

Numba backend does not deepcopy shared outputs #50

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

Closed
ricardoV94 opened this issue Nov 29, 2022 · 2 comments
Closed

Numba backend does not deepcopy shared outputs #50

ricardoV94 opened this issue Nov 29, 2022 · 2 comments
Labels
bug Something isn't working numba

Comments

@ricardoV94
Copy link
Member

Please describe the purpose of filing this issue

import aesara
import aesara.tensor as at

x = aesara.shared(0, name="x")

f = aesara.function([], x, mode=None)
f().itemset(2)
assert x.get_value() == 0  # Fine

f = aesara.function([], x, mode="NUMBA")
f().itemset(2)
assert x.get_value() == 0  # AssertionError
@HangenYuu
Copy link
Contributor

I cannot reproduce the error anymore

import pytensor

x = pytensor.shared(0, name="x")

f = pytensor.function([], x, mode=None)
f().itemset(2)
assert x.get_value() == 0  # Fine

f = pytensor.function([], x, mode="NUMBA")
f().itemset(2)
assert x.get_value() == 0  # Also fine

@ricardoV94
Copy link
Member Author

Perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working numba
Projects
None yet
Development

No branches or pull requests

2 participants