Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
70d574cc
提交
70d574cc
authored
3月 07, 2012
作者:
nouiz
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #508 from delallea/minor
Minor stuff
上级
1fef32f1
f29873c2
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
16 行增加
和
16 行删除
+16
-16
install.txt
doc/install.txt
+1
-1
profiling.py
theano/compile/profiling.py
+13
-13
sharedvalue.py
theano/compile/sharedvalue.py
+2
-2
没有找到文件。
doc/install.txt
浏览文件 @
70d574cc
...
@@ -776,7 +776,7 @@ compile GotoBLAS2 (ATLAS may work too, but was not tested, and is
...
@@ -776,7 +776,7 @@ compile GotoBLAS2 (ATLAS may work too, but was not tested, and is
usually reported to be slower and more difficult to compile -- especially
usually reported to be slower and more difficult to compile -- especially
on Windows).
on Windows).
GotoBLAS2 can be downloaded
GotoBLAS2 can be downloaded
`here <http://www.tacc.utexas.edu/tacc-projects/gotoblas2
/downloads
>`__
`here <http://www.tacc.utexas.edu/tacc-projects/gotoblas2>`__
(we tested v1.13).
(we tested v1.13).
To compile it, you will also need MSYS and Perl (installation steps are
To compile it, you will also need MSYS and Perl (installation steps are
described below).
described below).
...
...
theano/compile/profiling.py
浏览文件 @
70d574cc
...
@@ -46,7 +46,7 @@ def _atexit_print_fn():
...
@@ -46,7 +46,7 @@ def _atexit_print_fn():
if
len
(
_atexit_print_list
)
>
1
:
if
len
(
_atexit_print_list
)
>
1
:
# Make a global profile
# Make a global profile
cum
=
copy
.
copy
(
_atexit_print_list
[
0
])
cum
=
copy
.
copy
(
_atexit_print_list
[
0
])
cum
.
message
=
"Sum of all Theano function"
cum
.
message
=
"Sum of all Theano function
s
"
for
ps
in
_atexit_print_list
[
1
:]:
for
ps
in
_atexit_print_list
[
1
:]:
for
attr
in
[
"compile_time"
,
"fct_call_time"
,
"fct_callcount"
,
for
attr
in
[
"compile_time"
,
"fct_call_time"
,
"fct_callcount"
,
"vm_call_time"
,
"optimizer_time"
,
"linker_time"
]:
"vm_call_time"
,
"optimizer_time"
,
"linker_time"
]:
...
@@ -375,7 +375,7 @@ class ProfileStats(object):
...
@@ -375,7 +375,7 @@ class ProfileStats(object):
local_time
,
100
*
local_time
/
self
.
fct_call_time
)
local_time
,
100
*
local_time
/
self
.
fct_call_time
)
print
>>
file
,
' Total compile time:
%
es'
%
self
.
compile_time
print
>>
file
,
' Total compile time:
%
es'
%
self
.
compile_time
print
>>
file
,
' Theano Optimizer time:
%
es'
%
self
.
optimizer_time
print
>>
file
,
' Theano Optimizer time:
%
es'
%
self
.
optimizer_time
print
>>
file
,
' Theano Linker time
(include c, cuda
code generation/compiling):
%
es'
%
self
.
linker_time
print
>>
file
,
' Theano Linker time
(includes C, CUDA
code generation/compiling):
%
es'
%
self
.
linker_time
print
>>
file
,
''
print
>>
file
,
''
...
@@ -724,13 +724,13 @@ if 0: # old code still to be ported from ProfileMode
...
@@ -724,13 +724,13 @@ if 0: # old code still to be ported from ProfileMode
class
ScanProfileStats
(
ProfileStats
):
class
ScanProfileStats
(
ProfileStats
):
callcount
=
0.0
callcount
=
0.0
nbsteps
=
0.0
nbsteps
=
0.0
call_time
=
0.0
call_time
=
0.0
def
__init__
(
self
,
atexit_print
=
True
,
name
=
None
,
**
kwargs
):
def
__init__
(
self
,
atexit_print
=
True
,
name
=
None
,
**
kwargs
):
super
(
ScanProfileStats
,
self
)
.
__init__
(
atexit_print
,
**
kwargs
)
super
(
ScanProfileStats
,
self
)
.
__init__
(
atexit_print
,
**
kwargs
)
self
.
name
=
name
self
.
name
=
name
def
summary_function
(
self
,
file
):
def
summary_function
(
self
,
file
):
# RP: everytime we compile a function a ProfileStats is created for
# RP: everytime we compile a function a ProfileStats is created for
# that function. This means that everytime a optimization replaces
# that function. This means that everytime a optimization replaces
...
@@ -748,20 +748,20 @@ class ScanProfileStats(ProfileStats):
...
@@ -748,20 +748,20 @@ class ScanProfileStats(ProfileStats):
else
:
else
:
print
>>
file
,
'Scan Op profiling'
print
>>
file
,
'Scan Op profiling'
print
>>
file
,
'=================='
print
>>
file
,
'=================='
print
>>
file
,
' Message:
%
s'
%
self
.
message
print
>>
file
,
' Message:
%
s'
%
self
.
message
print
>>
file
,
' Time in
%
i calls of the op (for a total of
%
i steps)
%
es'
%
(
print
>>
file
,
(
' Time in
%
i calls of the op (for a total of
%
i '
self
.
callcount
,
self
.
nbsteps
,
self
.
call_time
)
'steps)
%
es'
%
(
self
.
callcount
,
self
.
nbsteps
,
self
.
call_time
))
print
>>
file
,
''
print
>>
file
,
''
val
=
0
val
=
0
if
self
.
call_time
>
0
:
if
self
.
call_time
>
0
:
val
=
self
.
vm_call_time
*
100
/
self
.
call_time
val
=
self
.
vm_call_time
*
100
/
self
.
call_time
print
>>
file
,
' Total time spent in calling the VM
%
es (
%.3
f
%%
)'
%
(
print
>>
file
,
' Total time spent in calling the VM
%
es (
%.3
f
%%
)'
%
(
self
.
vm_call_time
,
val
)
self
.
vm_call_time
,
val
)
val
=
100
val
=
100
if
self
.
call_time
>
0
:
if
self
.
call_time
>
0
:
val
=
100.
-
self
.
vm_call_time
*
100
/
self
.
call_time
val
=
100.
-
self
.
vm_call_time
*
100
/
self
.
call_time
print
>>
file
,
' Total overhead (computing slices
..)
%
es (
%.3
f
%%
)'
%
(
print
>>
file
,
' Total overhead (computing slices
..)
%
es (
%.3
f
%%
)'
%
(
self
.
call_time
-
self
.
vm_call_time
,
val
)
self
.
call_time
-
self
.
vm_call_time
,
val
)
print
>>
file
,
''
print
>>
file
,
''
theano/compile/sharedvalue.py
浏览文件 @
70d574cc
...
@@ -145,12 +145,12 @@ class SharedVariable(Variable):
...
@@ -145,12 +145,12 @@ class SharedVariable(Variable):
def
_value_get
(
self
):
def
_value_get
(
self
):
raise
Exception
(
"sharedvar.value does not exist anymore. Use "
raise
Exception
(
"sharedvar.value does not exist anymore. Use "
"sharedvar.get_value() or sharedvar.
g
et_value()"
"sharedvar.get_value() or sharedvar.
s
et_value()"
" instead."
)
" instead."
)
def
_value_set
(
self
,
new_value
):
def
_value_set
(
self
,
new_value
):
raise
Exception
(
"sharedvar.value does not exist anymore. Use "
raise
Exception
(
"sharedvar.value does not exist anymore. Use "
"sharedvar.get_value() or sharedvar.
g
et_value()"
"sharedvar.get_value() or sharedvar.
s
et_value()"
" instead."
)
" instead."
)
# We keep this just to raise an error
# We keep this just to raise an error
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论