Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
ce53f5e8
提交
ce53f5e8
authored
8月 07, 2017
作者:
abergeron
提交者:
GitHub
8月 07, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #6273 from nouiz/gh-6268_scan_profile
[CRASH] Crash fix when we don't do scan(..., profile=True)
上级
fd33e468
0be1f53f
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
18 行增加
和
7 行删除
+18
-7
scan_op.py
theano/scan_module/scan_op.py
+18
-7
没有找到文件。
theano/scan_module/scan_op.py
浏览文件 @
ce53f5e8
...
...
@@ -2895,7 +2895,15 @@ def profile_printer(message, compile_time, fct_call_time,
total_scan_fct_time
=
0
total_scan_op_time
=
0
for
node
,
v
in
iteritems
(
apply_time
):
if
isinstance
(
node
.
op
,
Scan
)
and
node
.
op
.
fn
.
profile
:
if
isinstance
(
node
.
op
,
Scan
)
and
not
node
.
op
.
fn
.
profile
:
print
(
" One scan node do not have its inner profile enabled. "
"If you enable Theano profiler with "
"'theano.function(..., profile=True)', you must manually"
" enable the profiling for each scan too: "
"'theano.scan_module.scan(...,profile=True)'."
" Or use Theano flag 'profile=True'."
,
file
=
file
)
elif
isinstance
(
node
.
op
,
Scan
)
and
node
.
op
.
fn
.
profile
:
if
v
>
0
:
scan_fct_time
=
node
.
op
.
fn
.
profile
.
call_time
scan_op_time
=
sum
(
node
.
op
.
fn
.
profile
.
apply_time
.
values
())
...
...
@@ -2911,9 +2919,12 @@ def profile_printer(message, compile_time, fct_call_time,
else
:
print
((
' The node took 0s, so we can not '
'compute the overhead'
),
node
,
file
=
file
)
print
(
'total
%5.1
fs
%5.1
fs
%5.1
fs
%5.1
f
%% %5.1
f
%%
'
%
(
total_super_scan_time
,
total_scan_fct_time
,
total_scan_op_time
,
total_scan_fct_time
/
total_super_scan_time
*
100
,
total_scan_op_time
/
total_super_scan_time
*
100
),
file
=
file
)
if
total_super_scan_time
==
0
:
print
(
' No scan have its inner profile enabled.'
,
file
=
file
)
else
:
print
(
'total
%5.1
fs
%5.1
fs
%5.1
fs
%5.1
f
%% %5.1
f
%%
'
%
(
total_super_scan_time
,
total_scan_fct_time
,
total_scan_op_time
,
total_scan_fct_time
/
total_super_scan_time
*
100
,
total_scan_op_time
/
total_super_scan_time
*
100
),
file
=
file
)
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论