提交 350edca0 authored 作者: Frederic's avatar Frederic 提交者: Arnaud Bergeron

Make Composite raise an error for case not supported

上级 41a8e89b
......@@ -3472,6 +3472,8 @@ class Composite(ScalarOp):
# that will flatten Composite. We don't need to do this
# recusively, as the way the fusion optimizer work, we have
# only 1 new Composite each time at the output.
for i in inputs:
assert i not in outputs # This isn't supported, use identity
if len(outputs) > 1 or not any([isinstance(var.owner.op, Composite)
for var in outputs]):
# No inner Composite
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论