提交 1d074416 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Document the config flag dnn.conv.workmem

上级 3babf29d
...@@ -484,6 +484,25 @@ import theano and print the config variable, as in: ...@@ -484,6 +484,25 @@ import theano and print the config variable, as in:
A directory with bin/, lib/, include/ folders containing cuda utilities. A directory with bin/, lib/, include/ folders containing cuda utilities.
.. attribute:: config.dnn.conv.workmem
String value: 'none', 'small', 'large'
Default: 'small'
The default value for the amount of working memory that is
tolerated in the convolution implementation in cudnn.
'none'
Don't allow any extra memory.
'small'
Allow extra memory that is much smaller than the input sizes.
'large'
Allow extra memory that is on the order of the input sizes.
.. attribute:: config.gcc.cxxflags .. attribute:: config.gcc.cxxflags
Default: "" Default: ""
......
...@@ -346,7 +346,8 @@ class GpuDnnConv(DnnBase, COp): ...@@ -346,7 +346,8 @@ class GpuDnnConv(DnnBase, COp):
def __init__(self, workmem=None): def __init__(self, workmem=None):
""" """
:param workmem: either 'none', 'small' or 'large'. Default is 'small'. :param workmem: either 'none', 'small' or 'large'. Default is
the value of :attr:`config.dnn.conv.workmem`.
""" """
COp.__init__(self, ["dnn_base.c", "dnn_conv_base.c", "dnn_fwd.c"], COp.__init__(self, ["dnn_base.c", "dnn_conv_base.c", "dnn_fwd.c"],
"APPLY_SPECIFIC(conv_fwd)") "APPLY_SPECIFIC(conv_fwd)")
...@@ -587,6 +588,8 @@ def dnn_conv(img, kerns, border_mode='valid', subsample=(1, 1), ...@@ -587,6 +588,8 @@ def dnn_conv(img, kerns, border_mode='valid', subsample=(1, 1),
:warning: The cuDNN library only works with GPU that have a compute :warning: The cuDNN library only works with GPU that have a compute
capability of 3.0 or higer. This means that older GPU will not capability of 3.0 or higer. This means that older GPU will not
work with this Op. work with this Op.
:note: The working memory of the op is influenced by
:attr:`config.dnn.conv.workmem`.
""" """
fgraph = getattr(img, 'fgraph', None) or getattr(kerns, 'fgraph', None) fgraph = getattr(img, 'fgraph', None) or getattr(kerns, 'fgraph', None)
if (border_mode == 'valid' and subsample == (1,1) and if (border_mode == 'valid' and subsample == (1,1) and
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论