提交 15b005cf authored 作者: Frederic's avatar Frederic

Better error message when compiling c code fail.

上级 84784b45
...@@ -838,11 +838,17 @@ class VM_Linker(link.LocalLinker): ...@@ -838,11 +838,17 @@ class VM_Linker(link.LocalLinker):
for k in storage_map: for k in storage_map:
compute_map[k] = [k.owner is None] compute_map[k] = [k.owner is None]
thunks = [node.op.make_thunk(node, thunks = []
storage_map, for node in order:
compute_map, try:
no_recycling) thunks.append(node.op.make_thunk(node,
for node in order] storage_map,
compute_map,
no_recycling))
except Exception, e:
e.args = ("The following error happened while"
" compiling the node", node, "\n") + e.args
raise
for node, thunk in zip(order, thunks): for node, thunk in zip(order, thunks):
thunk.inputs = [storage_map[v] for v in node.inputs] thunk.inputs = [storage_map[v] for v in node.inputs]
thunk.outputs = [storage_map[v] for v in node.outputs] thunk.outputs = [storage_map[v] for v in node.outputs]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论