提交 48dd7516 authored 作者: Frederic Bastien's avatar Frederic Bastien

make error more clear that the user can ignore it.

上级 c2aa9c43
...@@ -3102,9 +3102,10 @@ def local_elemwise_fusion_op(OP, max_input_fct=lambda node: 1024): ...@@ -3102,9 +3102,10 @@ def local_elemwise_fusion_op(OP, max_input_fct=lambda node: 1024):
if not fused: if not fused:
return False return False
if new_nb_input != len(inputs): if new_nb_input != len(inputs) or len(s_inputs) != len(inputs):
raise Exception("Something has gone wrong with the elemwise fusion optimization.") raise Exception("""Something has gone wrong with the elemwise
assert len(s_inputs) == len(inputs) fusion optimization. We skip this optimization. You can ignore this message,
your code will run correctly, but maybe slower.""")
otype = node.outputs[0].type otype = node.outputs[0].type
s_new_out=node.op.scalar_op(*s_g) s_new_out=node.op.scalar_op(*s_g)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论