Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
9c40f5ef
提交
9c40f5ef
authored
2月 24, 2011
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use the new ProxyDB to register 2 time the gpus optimizations.
上级
072b8fc5
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
6 行删除
+15
-6
__init__.py
theano/sandbox/cuda/__init__.py
+4
-1
opt.py
theano/sandbox/cuda/opt.py
+11
-5
没有找到文件。
theano/sandbox/cuda/__init__.py
浏览文件 @
9c40f5ef
...
@@ -193,7 +193,10 @@ def use(device, force=False, default_to_move_computation_to_gpu = True,
...
@@ -193,7 +193,10 @@ def use(device, force=False, default_to_move_computation_to_gpu = True,
"is already in use."
)
%
(
str
(
device
),
use
.
device_number
))
"is already in use."
)
%
(
str
(
device
),
use
.
device_number
))
if
default_to_move_computation_to_gpu
:
if
default_to_move_computation_to_gpu
:
optdb
.
add_tags
(
'gpu'
,
optdb
.
add_tags
(
'gpu_opt'
,
'fast_run'
,
'inplace'
)
optdb
.
add_tags
(
'gpu_after_fusion'
,
'fast_run'
,
'fast_run'
,
'inplace'
)
'inplace'
)
...
...
theano/sandbox/cuda/opt.py
浏览文件 @
9c40f5ef
...
@@ -6,8 +6,10 @@ import theano
...
@@ -6,8 +6,10 @@ import theano
import
numpy
import
numpy
from
theano
import
scalar
as
scal
from
theano
import
scalar
as
scal
from
theano
import
tensor
,
compile
,
gof
from
theano
import
tensor
,
compile
,
gof
from
theano.gof
import
(
local_optimizer
,
EquilibriumDB
,
SequenceDB
,
Optimizer
,
toolbox
,
DestroyHandler
,
EquilibriumOptimizer
)
from
theano.gof
import
(
local_optimizer
,
EquilibriumDB
,
SequenceDB
,
ProxyDB
,
Optimizer
,
toolbox
,
DestroyHandler
,
EquilibriumOptimizer
)
from
theano.sandbox.cuda.basic_ops
import
*
from
theano.sandbox.cuda.basic_ops
import
*
from
theano.sandbox.cuda.type
import
CudaNdarrayType
from
theano.sandbox.cuda.type
import
CudaNdarrayType
...
@@ -31,12 +33,16 @@ gpu_seqopt.register('gpu_local_optimizations', gpu_optimizer, 1,
...
@@ -31,12 +33,16 @@ gpu_seqopt.register('gpu_local_optimizations', gpu_optimizer, 1,
'fast_run'
,
'inplace'
)
'fast_run'
,
'inplace'
)
gpu_seqopt
.
register
(
'gpu_cut_transfers'
,
gpu_cut_copies
,
2
,
gpu_seqopt
.
register
(
'gpu_cut_transfers'
,
gpu_cut_copies
,
2
,
'fast_run'
,
'inplace'
)
'fast_run'
,
'inplace'
)
optdb
.
register
(
'gpu'
,
optdb
.
register
(
'gpu_opt'
,
gpu_seqopt
,
optdb
.
__position__
.
get
(
'add_destroy_handler'
,
49.5
)
-
1
)
gpu_seqopt
,
optdb
.
__position__
.
get
(
'add_destroy_handler'
,
49.5
)
-
1
,
'gpu'
)
# This second pass is needed as the fusion can put all the non float32 code
# This second pass is needed as the fusion can put all the non float32 code
# inside the elemwise. When it there is no float64 op, this is working.
# inside the elemwise. When it there is no float64 op, this is working.
optdb
.
register
(
'gpu_after_fusion'
,
optdb
.
register
(
'gpu_after_fusion'
,
gpu_seqopt
,
optdb
.
__position__
.
get
(
'elemwise_fusion'
,
71
)
+
.
1
)
ProxyDB
(
gpu_seqopt
),
optdb
.
__position__
.
get
(
'elemwise_fusion'
,
71
)
+
.
1
,
'gpu'
)
def
register_opt
(
*
tags
,
**
kwargs
):
def
register_opt
(
*
tags
,
**
kwargs
):
def
f
(
local_opt
):
def
f
(
local_opt
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论