Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
aa853330
提交
aa853330
authored
7月 08, 2016
作者:
sentient07
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Missed out comments
上级
430f0b6a
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
7 行增加
和
7 行删除
+7
-7
dnn.py
theano/gpuarray/dnn.py
+1
-1
nerv.py
theano/gpuarray/nerv.py
+1
-1
opt.py
theano/gpuarray/opt.py
+5
-5
没有找到文件。
theano/gpuarray/dnn.py
浏览文件 @
aa853330
...
...
@@ -1428,7 +1428,7 @@ class GpuDnnSoftmaxGrad(GpuDnnSoftmaxBase):
@register_opt2
([
AbstractConv2d
,
AbstractConv2d_gradWeights
,
AbstractConv2d_gradInputs
],
'fast_compile'
)
AbstractConv2d_gradInputs
],
'fast_compile'
,
'conv_dnn'
,
'cudnn'
)
def
local_abstractconv_cudnn_graph
(
op
,
context_name
,
inputs
,
outputs
):
if
(
not
isinstance
(
op
,
(
AbstractConv2d
,
AbstractConv2d_gradWeights
,
...
...
theano/gpuarray/nerv.py
浏览文件 @
aa853330
...
...
@@ -157,7 +157,7 @@ def local_dot_to_gemm16(op, ctx_name, inputs, outputs):
B
=
inputs
[
1
]
if
(
A
.
ndim
==
2
and
B
.
ndim
==
2
and
A
.
dtype
==
'float16'
and
B
.
dtype
==
'float16'
):
fgraph
=
inputs
[
0
]
.
fgraph
fgraph
=
getattr
(
inputs
[
0
],
'fgraph'
,
None
)
C
=
gpu_alloc_empty
(
ctx_name
,
dtype
=
'float16'
)(
shape_i
(
A
,
0
,
fgraph
),
shape_i
(
B
,
1
,
fgraph
))
return
Gemm16
()(
C
,
1.0
,
A
,
B
,
0.0
)
...
...
theano/gpuarray/opt.py
浏览文件 @
aa853330
...
...
@@ -299,12 +299,12 @@ class GraphToGPU(NavigatorOptimizer):
# Building a new graph
# Iterating through inputs of graph
target
=
infer_context_name
(
*
fgraph
.
inputs
)
target
=
str
(
infer_context_name
(
*
fgraph
.
inputs
)
)
for
i
in
fgraph
.
inputs
:
# Do not move *int* scalar to the GPU.
if
(
isinstance
(
i
.
type
,
tensor
.
TensorType
)
and
(
i
.
ndim
>
0
or
'int'
not
in
i
.
dtype
)):
mapping
[
i
]
=
as_gpuarray_variable
(
i
,
target
)
mapping
[
i
]
=
i
.
transfer
(
getattr
(
i
.
tag
,
target
,
None
)
)
else
:
mapping
[
i
]
=
i
for
i
in
fgraph
.
variables
:
...
...
@@ -670,7 +670,7 @@ def local_gpuflatten(op, context_name, inputs, outputs):
@register_opt
(
'fast_compile'
)
@op_lifter
([
tensor
.
Elemwise
])
@register_opt2
([
tensor
.
Elemwise
],
'fast_compile'
)
def
local_gpu_elemwise
(
op
,
context_name
,
inputs
,
outputs
):
def
local_gpu
a
_elemwise
(
op
,
context_name
,
inputs
,
outputs
):
scal_op
=
op
.
scalar_op
name
=
op
.
name
if
name
:
...
...
@@ -1285,7 +1285,7 @@ def local_inplace_sparseblockouter(node):
# This deals with any abstract convs that have a transfer somewhere
@register_opt
(
'fast_compile'
)
@register_opt
(
'fast_compile'
,
'conv_dnn'
,
'cudnn'
)
@op_lifter
([
AbstractConv2d
,
AbstractConv2d_gradWeights
,
AbstractConv2d_gradInputs
])
...
...
@@ -1298,7 +1298,7 @@ def local_lift_abstractconv2d(op, context_name, inputs, outputs):
@register_opt2
([
AbstractConv2d
,
AbstractConv2d_gradWeights
,
AbstractConv2d_gradInputs
],
'fast_compile'
)
AbstractConv2d_gradInputs
],
'fast_compile'
,
'conv_dnn'
,
'cudnn'
)
def
local_lift_abstractconv2d_graph
(
op
,
context_name
,
inputs
,
outputs
):
inps
=
list
(
inputs
)
inps
[
0
]
=
as_gpuarray_variable
(
inputs
[
0
],
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论