提交 25bce5d7 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron 提交者: Pascal Lamblin

Register the dnn optimizations for AbstractConv.

上级 01219a35
......@@ -1258,6 +1258,8 @@ def local_abstractconv_cudnn(node):
conv_mode=conv_mode)
return [rval]
conv_groupopt.register(local_abstactconv_cudnn)
@inplace_allocempty(GpuDnnConv, 2)
def local_dnn_conv_inplace(node, inputs):
......
......@@ -20,6 +20,7 @@ from theano.tensor.nnet.abstract_conv2d import (BaseAbstractConv2d,
AbstractConv2d,
AbstractConv2d_gradWeights,
AbstractConv2d_gradInputs)
from theano.tests.breakpoint import PdbBreakpoint
from .type import (GpuArrayType, GpuArrayConstant, get_context,
......@@ -800,6 +801,10 @@ def local_lift_abstractconv2dgrad(node, context_name):
node.inputs[2])]
# Register this here so that it goes after the abstract lifting
register_opt()(conv_groupopt)
# This will deal with ops that don't have an explicit transfer but
# have one of their inputs on the GPU already and the other not on the
# GPU (to avoid endlessly replacing things).
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论