提交 879aecfc authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Do not make the first compilation attempt fail.

The problem is that node.op was still pointing to "self", not the newly-created "op", so make_thunk still failed the first time.
上级 5de2cf2e
......@@ -808,7 +808,6 @@ class OpenMPOp(Op):
return default_openmp
def make_thunk(self, node, storage_map, compute_map, no_recycling):
op = self
if self.openmp:
if OpenMPOp.gxx_support_openmp is None:
OpenMPOp.gxx_support_openmp = OpenMPOp.test_gxx_support()
......@@ -821,8 +820,7 @@ class OpenMPOp(Op):
" To remove this warning set the theano flags `openmp`"
" to False.")
if OpenMPOp.gxx_support_openmp is False:
op = copy.copy(self)
op.openmp = False
self.openmp = False
theano.config.openmp = False
return super(OpenMPOp, op).make_thunk(node, storage_map,
compute_map, no_recycling)
return super(OpenMPOp, self).make_thunk(node, storage_map,
compute_map, no_recycling)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论