Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
7c9b917f
提交
7c9b917f
authored
3月 21, 2016
作者:
Frederic Bastien
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Theano flag profiling.ignore_first_call
上级
4b763483
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
29 行增加
和
2 行删除
+29
-2
config.txt
doc/library/config.txt
+8
-0
function_module.py
theano/compile/function_module.py
+3
-1
profiling.py
theano/compile/profiling.py
+11
-1
configdefaults.py
theano/configdefaults.py
+7
-0
没有找到文件。
doc/library/config.txt
浏览文件 @
7c9b917f
...
@@ -388,6 +388,14 @@ import theano and print the config variable, as in:
...
@@ -388,6 +388,14 @@ import theano and print the config variable, as in:
Do a debugprint of the profiled functions
Do a debugprint of the profiled functions
.. attribute:: config.profiling.ignore_first_call
Bool value: either True or False
Default False
Do we ignore the first call to a Theano function while profiling.
.. attribute:: config.lib.amdlibm
.. attribute:: config.lib.amdlibm
Bool value: either True or False
Bool value: either True or False
...
...
theano/compile/function_module.py
浏览文件 @
7c9b917f
...
@@ -928,7 +928,9 @@ class Function(object):
...
@@ -928,7 +928,9 @@ class Function(object):
profile
.
fct_call_time
+=
dt_call
profile
.
fct_call_time
+=
dt_call
if
hasattr
(
self
.
fn
,
'update_profile'
):
if
hasattr
(
self
.
fn
,
'update_profile'
):
self
.
fn
.
update_profile
(
profile
)
self
.
fn
.
update_profile
(
profile
)
if
profile
.
ignore_first_call
:
profile
.
reset
()
profile
.
ignore_first_call
=
False
if
self
.
return_none
:
if
self
.
return_none
:
return
None
return
None
elif
self
.
unpack_single
and
len
(
outputs
)
==
1
:
elif
self
.
unpack_single
and
len
(
outputs
)
==
1
:
...
...
theano/compile/profiling.py
浏览文件 @
7c9b917f
...
@@ -110,7 +110,16 @@ class ProfileStats(object):
...
@@ -110,7 +110,16 @@ class ProfileStats(object):
in this class.
in this class.
"""
"""
def
reset
(
self
):
""" Ignore previous function call"""
#self.compile_time = 0.
self
.
fct_call_time
=
0.
self
.
fct_callcount
=
0
self
.
vm_call_time
=
0.
self
.
apply_time
=
{}
self
.
apply_callcount
=
{}
# self.apply_cimpl = None
#self.messge = None
#
#
# Note on implementation:
# Note on implementation:
# Class variables are used here so that each one can be
# Class variables are used here so that each one can be
...
@@ -216,6 +225,7 @@ class ProfileStats(object):
...
@@ -216,6 +225,7 @@ class ProfileStats(object):
if
not
_atexit_registered
:
if
not
_atexit_registered
:
atexit
.
register
(
_atexit_print_fn
)
atexit
.
register
(
_atexit_print_fn
)
_atexit_registered
=
True
_atexit_registered
=
True
self
.
ignore_first_call
=
theano
.
config
.
ignore_first_call
def
class_time
(
self
):
def
class_time
(
self
):
"""
"""
...
...
theano/configdefaults.py
浏览文件 @
7c9b917f
...
@@ -1043,6 +1043,13 @@ AddConfigVar('profiling.debugprint',
...
@@ -1043,6 +1043,13 @@ AddConfigVar('profiling.debugprint',
BoolParam
(
False
),
BoolParam
(
False
),
in_c_key
=
False
)
in_c_key
=
False
)
AddConfigVar
(
'profiling.ignore_first_call'
,
"""
Do we ignore the first call of a Theano function.
"""
,
BoolParam
(
False
),
in_c_key
=
False
)
AddConfigVar
(
'optdb.position_cutoff'
,
AddConfigVar
(
'optdb.position_cutoff'
,
'Where to stop eariler during optimization. It represent the'
'Where to stop eariler during optimization. It represent the'
' position of the optimizer where to stop.'
,
' position of the optimizer where to stop.'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论