Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
2dc07279
提交
2dc07279
authored
9月 28, 2009
作者:
James Bergstra
浏览文件
操作
浏览文件
下载
差异文件
merge
上级
26afc143
ce9d89fc
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
+5
-5
profilemode.py
theano/compile/profilemode.py
+5
-5
没有找到文件。
theano/compile/profilemode.py
浏览文件 @
2dc07279
...
...
@@ -102,7 +102,7 @@ class ProfileMode(Mode):
def
print_diff_summary
(
self
,
other
,
n_apply_to_print
=
15
,
n_ops_to_print
=
20
):
""" As print_summary, but print the
absolute
difference on two different profile mode.
""" As print_summary, but print the difference on two different profile mode.
TODO: Also we don't print the Apply-wise summary as it don't work for now.
TODO: make comparaison with gpu code.
...
...
@@ -119,7 +119,7 @@ class ProfileMode(Mode):
for
a
,
ta
in
a_time
.
items
():
r
.
setdefault
(
a
,
0
)
tb
=
b_time
.
pop
(
a
,
0
)
r
[
a
]
+=
abs
(
ta
-
tb
)
r
[
a
]
+=
ta
-
tb
#they are missing in a
for
a
,
t
in
b_time
.
items
():
...
...
@@ -133,7 +133,7 @@ class ProfileMode(Mode):
for
a
,
ta
in
a_time
.
items
():
tb
=
b_time
.
pop
(
a
,
0
)
if
hasattr
(
a
,
'flops'
):
flops
[
a
]
=
a
bs
(
a
.
flops
*
a_call
[
a
]
/
ta
-
a
.
flops
*
b_call
[
a
]
/
tb
)
/
1e6
flops
[
a
]
=
a
.
flops
*
a_call
[
a
]
/
ta
-
a
.
flops
*
b_call
[
a
]
/
tb
/
1e6
#they are missing in a
for
b
,
tb
in
b_time
.
items
():
...
...
@@ -142,8 +142,8 @@ class ProfileMode(Mode):
return
flops
local_time
=
abs
(
self
.
local_time
[
0
]
-
other
.
local_time
[
0
])
compile_time
=
abs
(
self
.
compile_time
-
other
.
compile_time
)
local_time
=
self
.
local_time
[
0
]
-
other
.
local_time
[
0
]
compile_time
=
self
.
compile_time
-
other
.
compile_time
apply_time
=
diff_dict
(
self
.
apply_time
,
other
.
apply_time
)
apply_call
=
diff_dict
(
self
.
apply_call
,
other
.
apply_call
)
op_time
=
diff_dict
(
self
.
op_time
,
other
.
op_time
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论