提交 79a344c5 authored 作者: Frederic Bastien's avatar Frederic Bastien

flake8

上级 e00f13bc
...@@ -773,7 +773,7 @@ def split_huge_add_or_mul(node): ...@@ -773,7 +773,7 @@ def split_huge_add_or_mul(node):
that can generate op with too much input and it check for that. that can generate op with too much input and it check for that.
""" """
if node.op.scalar_op in (scal.add, scal.mul): if node.op.scalar_op in (scalar.add, scalar.mul):
max_nb_inputs = max_inputs_to_GpuElemwise(node) max_nb_inputs = max_inputs_to_GpuElemwise(node)
if max_nb_inputs <= 1 and len(node.inputs) > 1: if max_nb_inputs <= 1 and len(node.inputs) > 1:
return False return False
......
...@@ -7357,7 +7357,7 @@ def local_add_mul_fusion(node): ...@@ -7357,7 +7357,7 @@ def local_add_mul_fusion(node):
isinstance(inp.owner.op.scalar_op, s_op) and isinstance(inp.owner.op.scalar_op, s_op) and
# Do not duplicate the operation. # Do not duplicate the operation.
len(inp.clients) == 1 and len(inp.clients) == 1 and
(nb_inputs+len(inp.owner.inputs) - 1) <= max_inputs): (nb_inputs + len(inp.owner.inputs) - 1) <= max_inputs):
new_inp.extend(inp.owner.inputs) new_inp.extend(inp.owner.inputs)
fused = True fused = True
else: else:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论