提交 bc269602 authored 作者: Frederic's avatar Frederic

Remove condition that is always True as we check if it was "output" before and…

Remove condition that is always True as we check if it was "output" before and it is the only string supported.
上级 9161c88e
...@@ -3198,8 +3198,7 @@ class GpuAlloc(GpuOp): ...@@ -3198,8 +3198,7 @@ class GpuAlloc(GpuOp):
# If the output is a constant, it will have to be deepcopied # If the output is a constant, it will have to be deepcopied
# each time the function is called. So we do not fold. # each time the function is called. So we do not fold.
return False return False
elif (not isinstance(client[0], basestring) and elif (#The following ops work inplace of their input id 0.
#It is the inputs id 0 of the following op
client[1] == 0 and client[1] == 0 and
isinstance(client[0].op, ( isinstance(client[0].op, (
#Ops that will work inplace on the Alloc. So if they #Ops that will work inplace on the Alloc. So if they
......
...@@ -2625,8 +2625,7 @@ class Alloc(gof.Op): ...@@ -2625,8 +2625,7 @@ class Alloc(gof.Op):
# If the output is a constant, it will have to be deepcopied # If the output is a constant, it will have to be deepcopied
# each time the function is called. So we do not fold. # each time the function is called. So we do not fold.
return False return False
elif (not isinstance(client[0], basestring) and elif (#The following ops work inplace of their input id 0.
#It is the inputs id 0 of the following op
client[1] == 0 and client[1] == 0 and
isinstance(client[0].op, ( isinstance(client[0].op, (
#Ops that will work inplace on the Alloc. So if they #Ops that will work inplace on the Alloc. So if they
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论