Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
c36f9a29
提交
c36f9a29
authored
10月 20, 2015
作者:
carriepl
提交者:
Frederic
12月 16, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify cuda/dnn.py to support new convolution implementations
上级
13bad511
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
22 行增加
和
23 行删除
+22
-23
dnn.py
theano/sandbox/cuda/dnn.py
+22
-23
没有找到文件。
theano/sandbox/cuda/dnn.py
浏览文件 @
c36f9a29
...
...
@@ -401,9 +401,8 @@ class GpuDnnConv(DnnBase, COp):
workmem
*deprecated*, use parameter algo instead.
algo
['none', 'small', 'large', 'fft', 'guess_once',
'guess_on_shape_change', 'time_once',
'time_on_shape_change']
['none', 'small', 'large', 'fft', '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`.
...
...
@@ -445,9 +444,9 @@ class GpuDnnConv(DnnBase, COp):
raise
RuntimeError
(
"CuDNN convolution timing requires CuDNN "
"v3"
)
assert
self
.
algo
in
[
'none'
,
'small'
,
'large'
,
'fft'
,
'
guess_once
'
,
'guess_on
_shape_change'
,
'time_onc
e'
,
'time_on_shape_change'
]
assert
self
.
algo
in
[
'none'
,
'small'
,
'large'
,
'fft'
,
'
fft_tiling
'
,
'guess_on
ce'
,
'guess_on_shape_chang
e'
,
'time_on
ce'
,
'time_on
_shape_change'
]
def
__setstate__
(
self
,
d
):
self
.
__dict__
.
update
(
d
)
...
...
@@ -659,8 +658,8 @@ class GpuDnnConvGradW(DnnBase, COp):
The convolution descriptor.
workmem
*deprecated*, use parameter algo instead.
algo : {'none', 'deterministic', 'fft', 'guess_once', 'guess_on_shape_change', 'time_once', 'time_on_shape_change'}
Default is the value of :attr:`config.dnn.conv.algo_bwd`.
algo : {'none', 'deterministic', 'fft', '
small', '
guess_once', 'guess_on_shape_change', 'time_once', 'time_on_shape_change'}
Default is the value of :attr:`config.dnn.conv.algo_bwd
_filter
`.
"""
...
...
@@ -678,15 +677,15 @@ class GpuDnnConvGradW(DnnBase, COp):
self
.
algo
=
workmem
else
:
if
algo
is
None
:
algo
=
config
.
dnn
.
conv
.
algo_bwd
algo
=
config
.
dnn
.
conv
.
algo_bwd
_filter
self
.
algo
=
algo
self
.
inplace
=
inplace
if
self
.
inplace
:
self
.
destroy_map
=
{
0
:
[
2
]}
assert
self
.
algo
in
[
'none'
,
'deterministic'
,
'fft'
,
'
guess_once
'
,
'guess_on
_shape_change'
,
'time_onc
e'
,
'time_on_shape_change'
]
assert
self
.
algo
in
[
'none'
,
'deterministic'
,
'fft'
,
'
small
'
,
'guess_on
ce'
,
'guess_on_shape_chang
e'
,
'time_on
ce'
,
'time_on
_shape_change'
]
def
__setstate__
(
self
,
d
):
self
.
__dict__
.
update
(
d
)
...
...
@@ -694,7 +693,7 @@ class GpuDnnConvGradW(DnnBase, COp):
if
hasattr
(
self
,
'workmem'
):
self
.
algo
=
self
.
workmem
else
:
self
.
algo
=
config
.
dnn
.
conv
.
algo_bwd
self
.
algo
=
config
.
dnn
.
conv
.
algo_bwd
_filter
if
not
hasattr
(
self
,
'inplace'
):
self
.
inplace
=
False
...
...
@@ -737,7 +736,7 @@ class GpuDnnConvGradW(DnnBase, COp):
alg
=
'CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1'
elif
self
.
algo
==
'fft'
:
alg
=
'CUDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT'
elif
self
.
algo
==
'
none2
'
:
elif
self
.
algo
==
'
small
'
:
# need v3, non-deterministic, small workspace
alg
=
'CUDNN_CONVOLUTION_BWD_FILTER_ALGO_3'
elif
self
.
algo
in
[
'guess_once'
,
'guess_on_shape_change'
]:
...
...
@@ -799,7 +798,7 @@ class GpuDnnConv3dGradW(GpuDnnConvGradW):
:param workmem:
*deprecated*, use parameter algo instead.
:param algo: ['none', 'guess_once', 'guess_on_shape_change', 'time_once', 'time_on_shape_change']
Default is the value of :attr:`config.dnn.conv.algo_bwd`.
Default is the value of :attr:`config.dnn.conv.algo_bwd
_filter
`.
"""
__props__
=
(
'algo'
,
'inplace'
,)
...
...
@@ -867,11 +866,11 @@ class GpuDnnConvGradI(DnnBase, COp):
workmem
*deprecated*, use parameter algo instead.
algo
['none', 'deterministic', 'fft', 'guess_once',
['none', 'deterministic', 'fft', '
fft_tiling', '
guess_once',
'guess_on_shape_change', 'time_once',
'time_on_shape_change']
Default is the value of :attr:`config.dnn.conv.algo_bwd`.
Default is the value of :attr:`config.dnn.conv.algo_bwd
_data
`.
"""
...
...
@@ -890,15 +889,15 @@ class GpuDnnConvGradI(DnnBase, COp):
self
.
algo
=
workmem
else
:
if
algo
is
None
:
algo
=
config
.
dnn
.
conv
.
algo_bwd
algo
=
config
.
dnn
.
conv
.
algo_bwd
_data
self
.
algo
=
algo
self
.
inplace
=
inplace
if
self
.
inplace
:
self
.
destroy_map
=
{
0
:
[
2
]}
assert
self
.
algo
in
[
'none'
,
'deterministic'
,
'fft'
,
'
guess_once
'
,
'guess_on
_shape_change'
,
'time_onc
e'
,
'time_on_shape_change'
]
assert
self
.
algo
in
[
'none'
,
'deterministic'
,
'fft'
,
'
fft_tiling
'
,
'guess_on
ce'
,
'guess_on_shape_chang
e'
,
'time_on
ce'
,
'time_on
_shape_change'
]
def
__setstate__
(
self
,
d
):
self
.
__dict__
.
update
(
d
)
...
...
@@ -906,7 +905,7 @@ class GpuDnnConvGradI(DnnBase, COp):
if
hasattr
(
self
,
'workmem'
):
self
.
algo
=
self
.
workmem
else
:
self
.
algo
=
config
.
dnn
.
conv
.
algo_bwd
self
.
algo
=
config
.
dnn
.
conv
.
algo_bwd
_data
if
not
hasattr
(
self
,
'inplace'
):
self
.
inplace
=
False
...
...
@@ -1013,7 +1012,7 @@ class GpuDnnConv3dGradI(GpuDnnConvGradI):
:param algo: ['none', 'guess_once', 'guess_on_shape_change',
'time_once', 'time_on_shape_change']
Default is the value of :attr:`config.dnn.conv.algo_bwd`.
Default is the value of :attr:`config.dnn.conv.algo_bwd
_data
`.
"""
__props__
=
(
'algo'
,
'inplace'
,)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论