提交 fb27784f authored 作者: James Bergstra's avatar James Bergstra

added a DECREF to GpuGemm

上级 cbf51c99
...@@ -161,7 +161,7 @@ class GpuGemm(Op): ...@@ -161,7 +161,7 @@ class GpuGemm(Op):
return Apply(self, [z, a, x, y, b], [z.type()]) return Apply(self, [z, a, x, y, b], [z.type()])
def c_code_cache_version(self): def c_code_cache_version(self):
return (1,0) return (2,)
def c_code(self, node, name, inputs, outputs, sub): def c_code(self, node, name, inputs, outputs, sub):
z_in, a, x, y, b = inputs z_in, a, x, y, b = inputs
...@@ -183,6 +183,7 @@ class GpuGemm(Op): ...@@ -183,6 +183,7 @@ class GpuGemm(Op):
{ {
%(fail)s; %(fail)s;
} }
Py_XDECREF(%(z_out)s);
%(z_out)s = %(z_in)s; %(z_out)s = %(z_in)s;
Py_INCREF(%(z_out)s); Py_INCREF(%(z_out)s);
""" % locals() """ % locals()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论