提交 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): ...@@ -808,7 +808,6 @@ class OpenMPOp(Op):
return default_openmp return default_openmp
def make_thunk(self, node, storage_map, compute_map, no_recycling): def make_thunk(self, node, storage_map, compute_map, no_recycling):
op = self
if self.openmp: if self.openmp:
if OpenMPOp.gxx_support_openmp is None: if OpenMPOp.gxx_support_openmp is None:
OpenMPOp.gxx_support_openmp = OpenMPOp.test_gxx_support() OpenMPOp.gxx_support_openmp = OpenMPOp.test_gxx_support()
...@@ -821,8 +820,7 @@ class OpenMPOp(Op): ...@@ -821,8 +820,7 @@ class OpenMPOp(Op):
" To remove this warning set the theano flags `openmp`" " To remove this warning set the theano flags `openmp`"
" to False.") " to False.")
if OpenMPOp.gxx_support_openmp is False: if OpenMPOp.gxx_support_openmp is False:
op = copy.copy(self) self.openmp = False
op.openmp = False
theano.config.openmp = False theano.config.openmp = False
return super(OpenMPOp, op).make_thunk(node, storage_map, return super(OpenMPOp, self).make_thunk(node, storage_map,
compute_map, no_recycling) compute_map, no_recycling)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论