提交 8bdce1ea authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Use C code for Alloc of broadcasted scalar

上级 f2743791
......@@ -2542,7 +2542,7 @@ class Alloc(gof.Op):
def c_code(self, node, name, inp, out, sub):
# TODO: use the elemwise code generator here
if node.inputs[0].ndim == 0:
if python_all(node.inputs[0].broadcastable):
# filling with a scalar is a common use of alloc
# that we can implement relatively easily
vv = inp[0]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论