Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
fe43e786
提交
fe43e786
authored
5月 28, 2012
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move completly the optimizer_time and linker_time into the ProfileStats.
上级
51a6bbc6
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
12 行增加
和
10 行删除
+12
-10
function_module.py
theano/compile/function_module.py
+0
-3
mode.py
theano/compile/mode.py
+0
-2
profilemode.py
theano/compile/profilemode.py
+12
-5
没有找到文件。
theano/compile/function_module.py
浏览文件 @
fe43e786
...
...
@@ -1022,8 +1022,6 @@ class FunctionMaker(object):
optimizer_profile
=
optimizer
(
fgraph
)
end_optimizer
=
time
.
time
()
opt_time
=
end_optimizer
-
start_optimizer
mode
.
optimizer_time
+=
opt_time
if
profile
:
profile
.
optimizer_time
+=
opt_time
if
theano
.
config
.
profile_optimizer
:
...
...
@@ -1183,7 +1181,6 @@ class FunctionMaker(object):
linker_time
=
end_linker
-
start_linker
_logger
.
debug
(
'Linker took
%
f seconds'
,
linker_time
)
self
.
mode
.
linker_time
+=
linker_time
if
self
.
profile
:
self
.
profile
.
linker_time
+=
linker_time
_fn
.
time_thunks
=
self
.
profile
.
flag_time_thunks
...
...
theano/compile/mode.py
浏览文件 @
fe43e786
...
...
@@ -262,8 +262,6 @@ class Mode(object):
self
.
call_time
=
0
self
.
fn_time
=
0
linker
.
mode
=
self
# TODO: WHY IS THIS HERE?
self
.
optimizer_time
=
0
self
.
linker_time
=
0
def
__str__
(
self
):
return
"
%
s(linker =
%
s, optimizer =
%
s)"
%
(
self
.
__class__
.
__name__
,
...
...
theano/compile/profilemode.py
浏览文件 @
fe43e786
...
...
@@ -202,8 +202,6 @@ class ProfileMode(Mode):
self
.
call_time
=
0
self
.
fn_time
=
0
self
.
optimizer_time
=
0
self
.
linker_time
=
0
def
print_summary
(
self
,
**
kwargs
):
""" Print 3 summary that show where the time is spend. The first show an Apply-wise summary, the second show an Op-wise summary, the third show an type-Op-wise summary.
...
...
@@ -289,9 +287,18 @@ class ProfileMode(Mode):
apply_cimpl
=
self
.
apply_cimpl
and
other
.
apply_cimpl
message
=
self
.
message
variable_shape
=
diff_dict
(
self
.
variable_shape
,
other
.
variable_shape
)
other_time
=
{
'linker_time'
:
self
.
linker_time
-
other
.
linker_time
,
'optimizer_time'
:
self
.
optimizer_time
-
other
.
optimizer_time
}
self_linker_time
=
sum
([
ps
.
linker_time
for
ps
in
self
.
profile_stats
.
values
()])
other_linker_time
=
sum
([
ps
.
linker_time
for
ps
in
other
.
profile_stats
.
values
()])
self_optimizer_time
=
sum
([
ps
.
optimizer_time
for
ps
in
self
.
profile_stats
.
values
()])
other_optimizer_time
=
sum
([
ps
.
optimizer_time
for
ps
in
other
.
profile_stats
.
values
()])
other_time
=
{
'linker_time'
:
self_linker_time
-
other_linker_time
,
'optimizer_time'
:
self_optimizer_time
-
other_optimizer_time
}
self
.
print_summary_
(
"print_diff_summary"
,
compile_time
,
fct_call_time
,
fct_call
,
apply_time
,
apply_cimpl
,
message
,
variable_shape
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论