提交 6156349b authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix problem with error raising in Scan perform.

上级 d68e0bfc
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论