Do we need to preserve undefined behavior in our rewrites? #942
Replies: 1 comment 3 replies
-
We really should be conditioning rewrites like If we want to avoid computing such conditions in a compiled graph, then we need to establish a means of specifying constraints on variables (e.g. We would still need to validate such conditions by default when/if they're inputs to a compiled function, as we currently do via It might be possible to extend our |
Beta Was this translation helpful? Give feedback.
-
We have a rewrite that replaces
exp(log(x)) -> x
, but introduces anan
switch if the original value was negative.Do we need to do this, or should we assume the input values are valid for the sake of performance? For instance, we assume something like this when rewriting
x/x->1
Beta Was this translation helpful? Give feedback.
All reactions