提交 89f7c537 authored 作者: Frederic's avatar Frederic

remove useless comparison

上级 e95b4eba
...@@ -296,12 +296,10 @@ def gpu_print_wrapper(op, cnda): ...@@ -296,12 +296,10 @@ def gpu_print_wrapper(op, cnda):
@op_lifter([tensor.printing.Print]) @op_lifter([tensor.printing.Print])
def local_gpu_print_op(node): def local_gpu_print_op(node):
x, = node.inputs x, = node.inputs
if x.owner and isinstance(x.owner.op, HostFromGpu): gpu_x, = x.owner.inputs
gpu_x, = x.owner.inputs new_op = node.op.__class__(global_fn=gpu_print_wrapper)
new_op = node.op.__class__(global_fn=gpu_print_wrapper) new_op.old_op = node.op
new_op.old_op = node.op return new_op(gpu_x)
return new_op(gpu_x)
return False
@register_opt() @register_opt()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论