If you look only a a chain of var, there is something like chain_check
or check_chain that can help you.
What are you trying to do?
Fred
Thanks, is this scan function actually calling the merge optimizer under the hood?
y1 = x + 1
y2 = x + 1
e = Env([x], [y1, y2])
MergeOptimizer().optimize(e)
return y1.owner == y2.owner
Fred
You can get *all* the inputs to each of y1 and y2 by
y1_inputs = gof.graph.inputs(y1)
y2_inputs = gof.graph.inputs(y2)
e = Env(y1_inputs + y2_inputs, [y1, y2])
# TODO: clone here like std_env() does
for i1, i2 in zip(y1_inputs, y2_inputs):
e.replace(i1, i2)
MergeOptimizer().optimize(e)
return e.outputs[0].owner == e.outputs[1].owner
2011/11/25 Frédéric Bastien <no...@nouiz.org>:
On Fri, Nov 25, 2011 at 4:33 PM, Olivier Delalleau
On Fri, Nov 25, 2011 at 11:39 PM, Olivier Delalleau
Fred