提交 2beb17a3 authored 作者: Frederic Bastien's avatar Frederic Bastien

Don't use CorrMM when there is no c compiler (no perform, it will fallback to…

Don't use CorrMM when there is no c compiler (no perform, it will fallback to the old conv that have perform)
上级 25e6df0f
...@@ -61,6 +61,8 @@ compile.optdb.register('local_inplace_sparse_block_outer', ...@@ -61,6 +61,8 @@ compile.optdb.register('local_inplace_sparse_block_outer',
# Conv opts # Conv opts
@local_optimizer([AbstractConv2d]) @local_optimizer([AbstractConv2d])
def local_abstractconv_gemm(node): def local_abstractconv_gemm(node):
if theano.config.cxx == "":
return
if not isinstance(node.op, AbstractConv2d): if not isinstance(node.op, AbstractConv2d):
return None return None
img, kern = node.inputs img, kern = node.inputs
...@@ -79,6 +81,8 @@ def local_abstractconv_gemm(node): ...@@ -79,6 +81,8 @@ def local_abstractconv_gemm(node):
@local_optimizer([AbstractConv2d_gradWeights]) @local_optimizer([AbstractConv2d_gradWeights])
def local_abstractconv_gradweight_gemm(node): def local_abstractconv_gradweight_gemm(node):
if theano.config.cxx == "":
return
if not isinstance(node.op, AbstractConv2d_gradWeights): if not isinstance(node.op, AbstractConv2d_gradWeights):
return None return None
img, topgrad, shape = node.inputs img, topgrad, shape = node.inputs
...@@ -98,6 +102,8 @@ def local_abstractconv_gradweight_gemm(node): ...@@ -98,6 +102,8 @@ def local_abstractconv_gradweight_gemm(node):
@local_optimizer([AbstractConv2d_gradInputs]) @local_optimizer([AbstractConv2d_gradInputs])
def local_abstractconv_gradinputs_gemm(node): def local_abstractconv_gradinputs_gemm(node):
if theano.config.cxx == "":
return
if not isinstance(node.op, AbstractConv2d_gradInputs): if not isinstance(node.op, AbstractConv2d_gradInputs):
return None return None
kern, topgrad, shape = node.inputs kern, topgrad, shape = node.inputs
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论