Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
cde07713
提交
cde07713
authored
10月 22, 2015
作者:
carriepl
提交者:
Frederic
12月 16, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add checks to make sure backward tiled-fft is not used when it shouldn't (cuda backend)
上级
b177f3a8
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
20 行增加
和
4 行删除
+20
-4
dnn_gi.c
theano/sandbox/cuda/dnn_gi.c
+20
-4
没有找到文件。
theano/sandbox/cuda/dnn_gi.c
浏览文件 @
cde07713
...
@@ -159,12 +159,17 @@ APPLY_SPECIFIC(conv_gi)(CudaNdarray *kerns, CudaNdarray *output,
...
@@ -159,12 +159,17 @@ APPLY_SPECIFIC(conv_gi)(CudaNdarray *kerns, CudaNdarray *output,
chosen_algo
=
CONV_ALGO
;
chosen_algo
=
CONV_ALGO
;
}
}
// The FFT implementation (only in
v
3 and onward) does not support strides,
// The FFT implementation (only in
V
3 and onward) does not support strides,
// 1x1 filters or inputs with a spatial dimension larger than 1024.
// 1x1 filters or inputs with a spatial dimension larger than 1024.
// If the chosen implementation is FFT, validate that it can be used
// The tiled-FFT implementation (only in V4 onward) does not support
// on the current data and default on a safe implementation if it
// strides.
// If the chosen implementation is FFT or tiled-FFT, validate that it can
// be used on the current data and default on a safe implementation if it
// can't.
// can't.
if
(
chosen_algo
==
CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT
&&
nb_dim
==
4
)
// Following code is 2d-specific, but it is fine as FFT and tiled-FFT are
// defined only for 2d-filters
if
((
chosen_algo
==
CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT_TILING
||
chosen_algo
==
CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT
)
&&
nb_dim
==
4
)
{
{
// Extract the properties of the convolution descriptor
// Extract the properties of the convolution descriptor
...
@@ -192,12 +197,23 @@ APPLY_SPECIFIC(conv_gi)(CudaNdarray *kerns, CudaNdarray *output,
...
@@ -192,12 +197,23 @@ APPLY_SPECIFIC(conv_gi)(CudaNdarray *kerns, CudaNdarray *output,
// Ensure that the selected implementation supports the requested
// Ensure that the selected implementation supports the requested
// convolution. Fall back to a safe implementation otherwise.
// convolution. Fall back to a safe implementation otherwise.
if
(
chosen_algo
==
CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT
)
{
if
(
stride_v
!=
1
||
stride_h
!=
1
||
input_h
>
1024
||
if
(
stride_v
!=
1
||
stride_h
!=
1
||
input_h
>
1024
||
input_w
>
1024
||
(
filter_h
==
1
&&
filter_w
==
1
))
input_w
>
1024
||
(
filter_h
==
1
&&
filter_w
==
1
))
{
{
chosen_algo
=
CUDNN_CONVOLUTION_BWD_DATA_ALGO_0
;
chosen_algo
=
CUDNN_CONVOLUTION_BWD_DATA_ALGO_0
;
}
}
}
}
else
{
// chosen_algo == CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT_TILING
if
(
stride_v
!=
1
||
stride_h
!=
1
)
{
chosen_algo
=
CUDNN_CONVOLUTION_BWD_DATA_ALGO_0
;
}
}
}
// Infer required workspace size from the chosen implementation
// Infer required workspace size from the chosen implementation
err
=
cudnnGetConvolutionBackwardDataWorkspaceSize
(
_handle
,
err
=
cudnnGetConvolutionBackwardDataWorkspaceSize
(
_handle
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论