提交 e2aadc30 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Restore node.op._op_use_c_code after changing it.

Razvan actually wrote that commit.
上级 dab5e122
......@@ -1222,11 +1222,15 @@ class OpWiseCLinker(link.LocalLinker):
for node in order:
# Maker sure we use the C version of the code whenever
# possible
old_value = node.op._op_use_c_code
try:
node.op._op_use_c_code = True
thunks += [node.op.make_thunk(node,
storage_map,
compute_map,
no_recycling)]
finally:
node.op._op_use_c_code = old_value
for node_idx, node in enumerate(order):
......
......@@ -401,11 +401,15 @@ class PerformLinker(LocalLinker):
for node in order:
# Maker sure we don't use C version of the code, but rather only
# the python version
old_value = node.op._op_use_c_code
try:
node.op._op_use_c_code = False
thunks += [node.op.make_thunk(node,
storage_map,
compute_map,
no_recycling)]
finally:
node.op._op_use_c_code = old_value
computed, last_user = gc_helper(order)
if self.allow_gc:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论