提交 6d7ece16 authored 作者: Ziye Fan's avatar Ziye Fan

fix bug of wrong node of the client

上级 4b574d29
...@@ -3597,12 +3597,17 @@ def local_fill_sink(node): ...@@ -3597,12 +3597,17 @@ def local_fill_sink(node):
# The newly created node c doesn't has 'clients', # The newly created node c doesn't has 'clients',
# so this iteration is took place with node.outputs[0] # so this iteration is took place with node.outputs[0]
replacements = {node.outputs[0]: c} replacements = {node.outputs[0]: c}
for client, _ in node.outputs[0].clients: for client, cl_idx in node.outputs[0].clients:
if (hasattr(client, 'op') and if (hasattr(client, 'op') and
isinstance(client.op, T.Elemwise) and isinstance(client.op, T.Elemwise) and
not client.op == T.fill): not client.op == T.fill):
# import ipdb; ipdb.set_trace() client_inputs = client.inputs[:]
r = local_fill_sink.transform(client) client_inputs[cl_idx] = c
new_client = client.op(*client_inputs)
# Add clients to new_client
new_client.owner.outputs[0].clients = client.outputs[0].clients
r = local_fill_sink.transform(new_client.owner)
if r is False: if r is False:
continue continue
replacements.pop(node.outputs[0], None) replacements.pop(node.outputs[0], None)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论