提交 96a01ecc authored 作者: Frederic Bastien's avatar Frederic Bastien

Don't try c code if cxx isn't set

上级 2e699b53
......@@ -916,7 +916,7 @@ class Op(utils.object2, PureOp, CLinkerOp):
fail and we try again 'py', prepare_node will be called twice.
"""
if impl is None or impl == 'c':
if (impl is None and theano.config.cxx) or impl == 'c':
self.prepare_node(node, storage_map=storage_map,
compute_map=compute_map, impl='c')
try:
......
......@@ -725,6 +725,8 @@ class VM_Linker(link.LocalLinker):
self.callback = callback
self.callback_input = callback_input
self.lazy = lazy
if c_thunks is None:
c_thunks = bool(theano.config.cxx)
self.c_thunks = c_thunks
self.allow_partial_eval = allow_partial_eval
self.updated_vars = {}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论