提交 5a1bfe9b authored 作者: Razvan Pascanu's avatar Razvan Pascanu

trick to avoid error raised when compiling ops that only have a make_thunk

上级 2cc09a3f
...@@ -401,7 +401,12 @@ class PerformLinker(LocalLinker): ...@@ -401,7 +401,12 @@ class PerformLinker(LocalLinker):
for node in order: for node in order:
# Maker sure we don't use C version of the code, but rather only # Maker sure we don't use C version of the code, but rather only
# the python version # the python version
old_value = node.op._op_use_c_code # Note : ops that implement their own make thunk don't usually
# have this attribute defiend !!
if hasattr(node.op, '_op_use_c_code'):
old_value = node.op._op_use_c_code
else:
old_value = False
try: try:
node.op._op_use_c_code = False node.op._op_use_c_code = False
thunks += [node.op.make_thunk(node, thunks += [node.op.make_thunk(node,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论