提交 5a1e170b authored 作者: Frédéric Bastien's avatar Frédéric Bastien

Merge pull request #2898 from abergeron/fix_advsub

Fix crash with GpuGemm.
......@@ -146,7 +146,6 @@ class GpuGemm(BlasOp, Gemm):
""" % vars
else:
code = """
Py_XDECREF(%(out)s);
%(out)s = gpublas_try_copy(%(out)s, %(C)s);
if (%(out)s == NULL) {
%(fail)s
......@@ -168,7 +167,7 @@ class GpuGemm(BlasOp, Gemm):
return code
def c_code_cache_version(self):
return (3,)
return (4,)
gpugemm_no_inplace = GpuGemm(inplace=False)
......
......@@ -1115,15 +1115,16 @@ class Scan(PureOp):
# this is a new vm-provided function or c linker
# they need this because the exception manipulation
# done by raise_with_op is not implemented in C.
if hasattr(self.fn, 'thunks'):
if hasattr(fn, 'thunks'):
# For the CVM
gof.link.raise_with_op(self.fn.nodes[self.fn.position_of_error],
self.fn.thunks[self.fn.position_of_error])
gof.link.raise_with_op(fn.nodes[fn.position_of_error],
fn.thunks[fn.position_of_error])
else:
# For the c linker
# We don't have access from python to all the temps values
# So for now, we just don't print the extra shapes/strides info
gof.vm.raise_with_op(self.fn.nodes[self.fn.position_of_error])
# We don't have access from python to all the
# temps values So for now, we just don't print
# the extra shapes/strides info
gof.vm.raise_with_op(fn.nodes[fn.position_of_error])
else:
# old-style linkers raise their own exceptions
raise
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论