提交 ed494e9b authored 作者: Frederic Bastien's avatar Frederic Bastien

Remove old code as now we only support cudnn 4007 and up.

上级 ae793316
......@@ -354,25 +354,6 @@ class GpuDnnConv(DnnBase, COp):
if self.inplace:
self.destroy_map = {0: [2]}
# In cuDNN version older than V3, the FFT implementation and the
# option to time the different implementations to get the fastest
# are both unavailable.
if version() < (3000, 3000):
if self.algo == 'fft':
raise RuntimeError("cuDNN FFT convolution requires cuDNN v3")
elif self.algo in ['guess_once', 'guess_on_shape_change']:
raise RuntimeError("cuDNN selection of convolution "
"implementation based on heuristics "
"requires cuDNN v3")
elif self.algo in ['time_once', 'time_on_shape_change']:
raise RuntimeError("cuDNN convolution timing requires cuDNN "
"v3")
# The fft_tiling implementation is only available from cuDNN V4 onward
if version() < (4000, 4000):
if self.algo == 'fft_tiling':
raise RuntimeError("cuDNN tiled-FFT convolution requires "
"cuDNN v4 or more recent")
if version() < (5000, 5000):
if self.algo == 'winograd':
......@@ -865,13 +846,6 @@ class GpuDnnConvGradI(DnnBase, COp):
if self.inplace:
self.destroy_map = {0: [2]}
# The small-workspace implementation is only available from cuDNN V4
# onward.
if version() < (4000, 4000):
if self.algo == 'fft_tiling':
raise RuntimeError("cuDNN's tiled-FFT convolution requires "
"cuDNN v4 or more recent")
if version() < (5000, 5000):
if self.algo == 'winograd':
raise RuntimeError("cuDNN's winograd convolution requires "
......@@ -1465,13 +1439,6 @@ class GpuDnnPoolDesc(GpuOp):
self.stride = stride
self.pad = pad
if self.get_ndim() == 3 and version() < (3000, 3000):
raise RuntimeError("cuDNN 3d pooling requires cuDNN v3")
if (mode == 'average_exc_pad' and max(pad) > 0 and
version() < (4004, 4004)):
raise RuntimeError(
"cuDNN pooling mode 'average_exc_pad' requires at least v4")
def get_ndim(self):
return len(self.ws)
......@@ -2110,9 +2077,6 @@ class GpuDnnSoftmaxBase(DnnBase):
DnnBase.__init__(self)
self.tensor_format = tensor_format
if algo == 'log' and version() < (3000, 3000):
raise RuntimeError("cuDNN log-softmax requires cuDNN v3")
assert(algo in ('fast', 'accurate', 'log'))
self.algo = algo
......@@ -3179,7 +3143,7 @@ if True:
@local_optimizer([GpuElemwise, LogSoftmax])
def local_log_softmax_dnn(node):
# The log-softmax implementation is only available starting at cuDNN V3
if not dnn_available() or version() < (3000, 3000):
if not dnn_available():
return
if (isinstance(node.op, GpuElemwise) and
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论