Fuse CAReduce
s and Elemwise
s
#1116
Labels
enhancement
New feature or request
graph rewriting
help wanted
Extra attention is needed
important
performance concern
We aren't currently converting
CAReduce
s ofElemwise
s into singleCAReduce
s:As the example shows, we first compute the
Elemwise
then immediately reduce it. Instead, we could fuse theCAReduce
andElemwise
scalarOp
s (i.e. create aComposite
scalarOp
corresponding toadd(exp(x), exp(y))
) and use that in a singleCAReduce
node that avoids the need for intermediate storage.The rewrites required to do this would incorporate most of the same logic from
aesara.tensor.basic_opt.FusionOptimizer
, but, instead of producing anotherElemwise
, it would result in a newCAReduce
.The text was updated successfully, but these errors were encountered: