-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
at.square(x)
and at.pow(x, 2)
don't etuplize to the same expresssion
#1213
Comments
Probably optimization. Wouldn't be surprised if squaring was faster than power(x, 2) |
So that could eventually become a rewrite? And is that universally true for every backend who is that distinction tied to the C backend? |
We already have some rewrites: aesara/aesara/tensor/rewriting/math.py Line 1892 in ec82b9f
I guess you mean we might be missing an intermediate canonicalization form that is the same for either graph |
Then we can have |
Note that Consistency is going to prevent special-casing the code in downstream libraries, for instance in AePPL. |
Which means that
a**2
will fail to unify withetuplize(at.square(a))
:I guess this question is more about why
at.square
is not an alias toat.pow(..., 2)
.The text was updated successfully, but these errors were encountered: