Add ScalarVariable
canonicalizations and rewrites
#1235
Labels
enhancement
New feature or request
graph rewriting
help wanted
Extra attention is needed
important
question
Further information is requested
request discussion
We don't really have any canonicalizations or rewrites for
ScalarVariable
-based (sub-)graphs.For example, this would simplify at compile-time in the
TensorVariable
case:Normally, these kinds of graphs wouldn't be generated by a user, so the issue doesn't arise all that often; however, I've noticed some examples of this during debugging that appear to arise from the construction of
Composite
Op
s.On a related note, we're missing a canonicalization that "compresses" nested
Composite
s:I'll need to dig up those examples I saw among the
Scan
tests and demonstrate how these cases arise via ourTensorVariable
-only interface. In general, we probably want to stick with aTensorVariable
-only interface and make as many changes as we can to prevent these situations from arising, but we may also need some of these rewrites regardless.The text was updated successfully, but these errors were encountered: