提交 33a1c605 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Assert that we don't have more than one output until we fix the problem of inplace overwriting.

上级 86e5bd8b
...@@ -185,6 +185,7 @@ class GpuElemwise(HideC, Elemwise): ...@@ -185,6 +185,7 @@ class GpuElemwise(HideC, Elemwise):
p = 0 p = 0
for n, o in enumerate(node.outputs): for n, o in enumerate(node.outputs):
if n in self.inplace_pattern: if n in self.inplace_pattern:
assert(len(node.outputs) == 1);
res += "\nargs[%(n)s].flags |= GE_WRITE;\n" % dict(n=self.inplace_pattern[n]) res += "\nargs[%(n)s].flags |= GE_WRITE;\n" % dict(n=self.inplace_pattern[n])
else: else:
nn = len(inps) + p nn = len(inps) + p
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论