Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
5d252340
提交
5d252340
authored
3月 11, 2013
作者:
Frederic
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add a new flag profile_memory that will print the inputs/outputs shapes in the apply node profile.
上级
7d044df1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
24 行增加
和
1 行删除
+24
-1
config.txt
doc/library/config.txt
+10
-0
profiling.py
theano/compile/profiling.py
+11
-1
vm.py
theano/gof/vm.py
+3
-0
没有找到文件。
doc/library/config.txt
浏览文件 @
5d252340
...
...
@@ -268,6 +268,15 @@ import theano and print the config variable, as in:
Do the vm/cvm linkers profile the execution of Theano functions?
.. attribute:: profile_memory
Bool value: either True or False
Default False
Do the vm/cvm linkers profile the memory of Theano functions get printed?
It only work when profile=True.
.. attribute:: profile_optimizer
Bool value: either True or False
...
...
@@ -275,6 +284,7 @@ import theano and print the config variable, as in:
Default False
Do the vm/cvm linkers profile the optimization phase when compiling a Theano function?
It only work when profile=True.
.. attribute:: config.lib.amdlibm
...
...
theano/compile/profiling.py
浏览文件 @
5d252340
...
...
@@ -523,6 +523,16 @@ class ProfileStats(object):
print
>>
file
,
format_str
%
(
f
,
ftot
,
t
,
t
/
nb_call
,
nb_call
,
nd_id
,
str
(
a
)[:
maxlen
])
if
not
config
.
profile_memory
:
continue
for
idx
,
var
in
enumerate
(
a
.
inputs
):
sh
=
self
.
variable_shape
.
get
(
var
,
'no shape'
)
dtype
=
getattr
(
var
,
'dtype'
,
'no dtype'
)
print
" input
%
d: dtype=
%
s, shape=
%
s "
%
(
idx
,
dtype
,
sh
)
for
idx
,
var
in
enumerate
(
a
.
outputs
):
sh
=
self
.
variable_shape
.
get
(
var
,
'no shape'
)
dtype
=
getattr
(
var
,
'dtype'
,
'no dtype'
)
print
" output
%
d: dtype=
%
s, shape=
%
s "
%
(
idx
,
dtype
,
sh
)
# Same as before, this I've sacrificied some information making
# the output more readable
#print >> file, ' %4.1f%% %5.1f%% %5.3fs %5.3fs %.2es %i %s'%(
...
...
@@ -670,7 +680,7 @@ class ProfileStats(object):
elif
self
.
fct_callcount
>
0
:
print
>>
file
,
(
" No node time accumulated "
"(hint: try config profiling.time_thunks=1)"
)
if
self
.
variable_shape
:
if
config
.
profile_memory
:
self
.
summary_memory
(
file
,
n_ops_to_print
)
if
self
.
optimizer_profile
:
print
"Optimizer Profile"
...
...
theano/gof/vm.py
浏览文件 @
5d252340
...
...
@@ -23,6 +23,9 @@ AddConfigVar('profile',
AddConfigVar
(
'profile_optimizer'
,
"If VM should collect optimizer profile information"
,
BoolParam
(
False
))
AddConfigVar
(
'profile_memory'
,
"If VM should collect memory profile information and print it"
,
BoolParam
(
False
))
def
filter_vm_lazy
(
val
):
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论