Tell jit to assume that x * 0 = 0 #11687
Unanswered
mariogeiger
asked this question in
Q&A
Replies: 1 comment 4 replies
-
I suspect this is not necessarily due to the need to handle NaN and Inf values, but because |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear jax developers,
If I print the xla output of
x + 0.0
I getIf I print the xla output of
x * 0.0
I getMy understanding is that it is due to the fact that
nan * 0.0
andinf * 0.0
are not equal to zero.Is there a way to gently ask the compiler to assume that
x * 0.0 = 0.0
for specific parts of the code?Is there an
unsafe_multiplication
operation and a function transformation that replaces all multiplication by their unsafe counterparts?Best regards,
Mario
Beta Was this translation helpful? Give feedback.
All reactions