提交 a817341a authored 作者: Ian Goodfellow's avatar Ian Goodfellow

commented perform method, since it's not implemented for all cases

上级 eb09a9a2
...@@ -548,6 +548,10 @@ class GpuCAReduce(GpuOp): ...@@ -548,6 +548,10 @@ class GpuCAReduce(GpuOp):
in xrange(x.type.ndim) if not self.reduce_mask[i]] in xrange(x.type.ndim) if not self.reduce_mask[i]]
return Apply(self, [x], [CudaNdarrayType(o_broadcast)()]) return Apply(self, [x], [CudaNdarrayType(o_broadcast)()])
"""
This method must be commented, because there's no way
to communicate that it's OK to call for + but not for
max
def perform(self, node, inp, out): def perform(self, node, inp, out):
x, = inp x, = inp
z, = out z, = out
...@@ -557,6 +561,7 @@ class GpuCAReduce(GpuOp): ...@@ -557,6 +561,7 @@ class GpuCAReduce(GpuOp):
# We can't call it here anyway because it hasn't # We can't call it here anyway because it hasn't
# been added to the python bindings yet # been added to the python bindings yet
z[0] = x.reduce_sum(self.reduce_mask) z[0] = x.reduce_sum(self.reduce_mask)
"""
def supports_c_code(self, inputs): def supports_c_code(self, inputs):
""" Returns True if the current op and reduce pattern """ Returns True if the current op and reduce pattern
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论