Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
94720cc4
提交
94720cc4
authored
4月 19, 2017
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Disable our CPU conv in float16
上级
21ad0782
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
14 行增加
和
10 行删除
+14
-10
opt.py
theano/tensor/nnet/opt.py
+14
-10
没有找到文件。
theano/tensor/nnet/opt.py
浏览文件 @
94720cc4
...
...
@@ -74,7 +74,7 @@ compile.optdb.register('local_inplace_sparse_block_outer',
def
local_abstractconv_gemm
(
node
):
# If theano.config.blas.ldflags is empty, Theano will use
# a NumPy C implementation of [sd]gemm_.
if
theano
.
config
.
cxx
==
""
:
if
theano
.
config
.
cxx
==
""
or
node
.
inputs
[
0
]
.
dtype
==
'float16'
:
return
if
not
isinstance
(
node
.
op
,
AbstractConv2d
):
return
None
...
...
@@ -98,7 +98,7 @@ def local_abstractconv_gemm(node):
def
local_abstractconv3d_gemm
(
node
):
# If theano.config.blas.ldflags is empty, Theano will use
# a NumPy C implementation of [sd]gemm_.
if
theano
.
config
.
cxx
==
""
:
if
theano
.
config
.
cxx
==
""
or
node
.
inputs
[
0
]
.
dtype
==
'float16'
:
return
if
not
isinstance
(
node
.
op
,
AbstractConv3d
):
return
None
...
...
@@ -122,7 +122,7 @@ def local_abstractconv3d_gemm(node):
def
local_abstractconv_gradweight_gemm
(
node
):
# If theano.config.blas.ldflags is empty, Theano will use
# a NumPy C implementation of [sd]gemm_.
if
theano
.
config
.
cxx
==
""
:
if
theano
.
config
.
cxx
==
""
or
node
.
inputs
[
0
]
.
dtype
==
'float16'
:
return
if
not
isinstance
(
node
.
op
,
AbstractConv2d_gradWeights
):
return
None
...
...
@@ -149,7 +149,7 @@ def local_abstractconv_gradweight_gemm(node):
def
local_abstractconv3d_gradweight_gemm
(
node
):
# If theano.config.blas.ldflags is empty, Theano will use
# a NumPy C implementation of [sd]gemm_.
if
theano
.
config
.
cxx
==
""
:
if
theano
.
config
.
cxx
==
""
or
node
.
inputs
[
0
]
.
dtype
==
'float16'
:
return
if
not
isinstance
(
node
.
op
,
AbstractConv3d_gradWeights
):
return
None
...
...
@@ -176,7 +176,7 @@ def local_abstractconv3d_gradweight_gemm(node):
def
local_abstractconv_gradinputs_gemm
(
node
):
# If theano.config.blas.ldflags is empty, Theano will use
# a NumPy C implementation of [sd]gemm_.
if
theano
.
config
.
cxx
==
""
:
if
theano
.
config
.
cxx
==
""
or
node
.
inputs
[
0
]
.
dtype
==
'float16'
:
return
if
not
isinstance
(
node
.
op
,
AbstractConv2d_gradInputs
):
return
None
...
...
@@ -201,7 +201,7 @@ def local_abstractconv_gradinputs_gemm(node):
def
local_abstractconv3d_gradinputs_gemm
(
node
):
# If theano.config.blas.ldflags is empty, Theano will use
# a NumPy C implementation of [sd]gemm_.
if
theano
.
config
.
cxx
==
""
:
if
theano
.
config
.
cxx
==
""
or
node
.
inputs
[
0
]
.
dtype
==
'float16'
:
return
if
not
isinstance
(
node
.
op
,
AbstractConv3d_gradInputs
):
return
None
...
...
@@ -225,7 +225,8 @@ def local_abstractconv3d_gradinputs_gemm(node):
@local_optimizer
([
AbstractConv2d
])
def
local_conv2d_cpu
(
node
):
if
not
isinstance
(
node
.
op
,
AbstractConv2d
):
if
(
not
isinstance
(
node
.
op
,
AbstractConv2d
)
or
node
.
inputs
[
0
]
.
dtype
==
'float16'
):
return
None
img
,
kern
=
node
.
inputs
...
...
@@ -280,7 +281,8 @@ def local_conv3d_cpu(node):
@local_optimizer
([
AbstractConv2d_gradWeights
])
def
local_conv2d_gradweight_cpu
(
node
):
if
not
isinstance
(
node
.
op
,
AbstractConv2d_gradWeights
):
if
(
not
isinstance
(
node
.
op
,
AbstractConv2d_gradWeights
)
or
node
.
inputs
[
0
]
.
dtype
==
'float16'
):
return
None
img
,
topgrad
,
shape
=
node
.
inputs
...
...
@@ -431,7 +433,8 @@ def local_conv3d_gradweight_cpu(node):
@local_optimizer
([
AbstractConv2d_gradInputs
])
def
local_conv2d_gradinputs_cpu
(
node
):
if
not
isinstance
(
node
.
op
,
AbstractConv2d_gradInputs
):
if
(
not
isinstance
(
node
.
op
,
AbstractConv2d_gradInputs
)
or
node
.
inputs
[
0
]
.
dtype
==
'float16'
):
return
None
kern
,
topgrad
,
shape
=
node
.
inputs
...
...
@@ -611,7 +614,8 @@ def local_abstractconv_check(node):
'available supporting the requested options. Did you exclude '
'both "conv_dnn" and "conv_gemm" from the optimizer? If on GPU, '
'is cuDNN available and does the GPU support it? If on CPU, '
'do you have a BLAS library installed Theano can link against?'
%
'do you have a BLAS library installed Theano can link against? '
'On the CPU we do not support float16.'
%
node
.
op
.
__class__
.
__name__
)
optdb
.
register
(
'AbstractConvCheck'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论