ifall([c!='output'andc.op==tensor.joinandall([i.ownerandi.owner.opin[host_from_gpu,tensor.alloc]foriinc.inputs[1:]])forc,idxinnode.outputs[0].clients]):#if the client is a subtensor with input on gpu or alloc
# return [new_node]
ifall([c.op==tensor.joinandall([i.ownerandi.owner.opin[host_from_gpu,tensor.alloc]foriinc.inputs[1:]])forc,idxinnode.outputs[0].clients]):#if the client is a subtensor with input on gpu or alloc