提交 0e9d1ab3 authored 作者: Frederic Bastien's avatar Frederic Bastien

Raise error of GpuElemwise with too much input when we create the node and not when we compile

上级 fe87d02b
......@@ -93,6 +93,10 @@ class GpuElemwise(HideC, Elemwise):
if len(outputs) > 1:
raise NotImplementedError()
if len(inputs) > max_inputs_to_GpuElemwise(outputs):
raise NotImplementedError(
"Can not make this GpuElemwise with that much inputs")
# Try to generate the kernel to catch SupportCodeErrors
scal_ins = [get_scal(i.dtype) for i in inputs]
fake_node = self.scalar_op.make_node(*[i() for i in scal_ins])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论