Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
49c79247
提交
49c79247
authored
3月 18, 2016
作者:
Frederic Bastien
提交者:
Mathieu Germain
4月 06, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add small and fft_tiling to GpuDnnConv3d
上级
420a832b
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
20 行增加
和
6 行删除
+20
-6
dnn.py
theano/sandbox/cuda/dnn.py
+20
-6
没有找到文件。
theano/sandbox/cuda/dnn.py
浏览文件 @
49c79247
...
@@ -384,7 +384,7 @@ class GpuDnnConv(DnnBase, COp):
...
@@ -384,7 +384,7 @@ class GpuDnnConv(DnnBase, COp):
# need v3
# need v3
alg
=
'CUDNN_CONVOLUTION_FWD_ALGO_FFT'
alg
=
'CUDNN_CONVOLUTION_FWD_ALGO_FFT'
elif
self
.
algo
==
'fft_tiling'
:
elif
self
.
algo
==
'fft_tiling'
:
# need v4
# need v4
for conv2d, need v5 for conv3d
alg
=
'CUDNN_CONVOLUTION_FWD_ALGO_FFT_TILING'
alg
=
'CUDNN_CONVOLUTION_FWD_ALGO_FFT_TILING'
elif
self
.
algo
in
[
'guess_once'
,
'guess_on_shape_change'
]:
elif
self
.
algo
in
[
'guess_once'
,
'guess_on_shape_change'
]:
# The convolution implementation should be choosen according
# The convolution implementation should be choosen according
...
@@ -478,7 +478,9 @@ class GpuDnnConv3d(GpuDnnConv):
...
@@ -478,7 +478,9 @@ class GpuDnnConv3d(GpuDnnConv):
:param descr: the convolution descriptor
:param descr: the convolution descriptor
:param workmem:
:param workmem:
*deprecated*, use parameter algo instead.
*deprecated*, use parameter algo instead.
:param algo: ['none', 'guess_once', 'guess_on_shape_change', 'time_once', 'time_on_shape_change']
:param algo: ['none', 'small', 'fft_tiling',
'guess_once', 'guess_on_shape_change',
'time_once', 'time_on_shape_change']
Default is the value of :attr:`config.dnn.conv.algo_fwd`.
Default is the value of :attr:`config.dnn.conv.algo_fwd`.
"""
"""
...
@@ -492,10 +494,22 @@ class GpuDnnConv3d(GpuDnnConv):
...
@@ -492,10 +494,22 @@ class GpuDnnConv3d(GpuDnnConv):
"Use 'algo' instead."
),
stacklevel
=
3
)
"Use 'algo' instead."
),
stacklevel
=
3
)
assert
algo
is
None
assert
algo
is
None
algo
=
workmem
algo
=
workmem
good_algo
=
[
'none'
,
'small'
,
'fft_tiling'
,
super
(
GpuDnnConv3d
,
self
)
.
__init__
(
inplace
=
inplace
,
algo
=
'none'
)
'guess_once'
,
'guess_on_shape_change'
,
assert
self
.
algo
in
[
'none'
,
'guess_once'
,
'guess_on_shape_change'
,
'time_once'
,
'time_on_shape_change'
]
'time_once'
,
'time_on_shape_change'
]
if
version
()
<
(
5000
,
5000
):
# Need to confirm when small was added for conv3d.
algo
=
'none'
elif
algo
is
None
and
config
.
dnn
.
conv
.
algo_fwd
not
in
good_algo
:
algo
=
'guess_once'
elif
algo
is
not
None
and
algo
not
in
good_algo
:
algo
=
'guess_once'
super
(
GpuDnnConv3d
,
self
)
.
__init__
(
inplace
=
inplace
,
algo
=
algo
)
assert
self
.
algo
in
good_algo
if
version
()
<
(
5000
,
5000
):
if
self
.
algo
==
'fft_tiling'
:
raise
RuntimeError
(
"CuDNN 3d tiled-FFT convolution requires "
"CuDNN v5 or more recent"
)
def
make_node
(
self
,
img
,
kern
,
output
,
desc
,
alpha
=
None
,
beta
=
None
):
def
make_node
(
self
,
img
,
kern
,
output
,
desc
,
alpha
=
None
,
beta
=
None
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论