Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
67927672
提交
67927672
authored
6月 01, 2017
作者:
Frédéric Bastien
提交者:
GitHub
6月 01, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5794 from ReyhaneAskari/faster_topo
Faster topo
上级
ba982dbf
82abb2a9
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
43 行增加
和
11 行删除
+43
-11
config.txt
doc/library/config.txt
+14
-0
profiling.py
theano/compile/profiling.py
+0
-1
configdefaults.py
theano/configdefaults.py
+11
-0
destroyhandler.py
theano/gof/destroyhandler.py
+0
-0
fg.py
theano/gof/fg.py
+18
-10
没有找到文件。
doc/library/config.txt
浏览文件 @
67927672
...
...
@@ -225,6 +225,20 @@ import theano and print the config variable, as in:
If True, we will print extra scan debug information.
.. attribute:: cycle_detection
String value, either ``regular`` or ``fast```
Default: ``regular``
If :attr:`cycle_detection` is set to ``regular``, most inplaces are allowed,
but it is slower. If :attr:`cycle_detection` is set to ``faster``,
less inplaces are allowed, but it makes the compilation faster.
The interaction of which one give the lower peak memory usage is complicated and
not predictable, so if you are close to the peak memory usage, triyng both
could give you a small gain.
.. attribute:: openmp
Bool value: either ``True`` or ``False``
...
...
theano/compile/profiling.py
浏览文件 @
67927672
...
...
@@ -830,7 +830,6 @@ class ProfileStats(object):
"""
from
theano.gpuarray
import
GpuArrayType
# Initial Mem info values [CPU, GPU]
node_memory_size
=
[
0
,
0
]
running_memory_size
=
[
0
,
0
]
...
...
theano/configdefaults.py
浏览文件 @
67927672
...
...
@@ -1476,6 +1476,17 @@ AddConfigVar('compile.wait',
IntParam
(
5
,
lambda
i
:
i
>
0
,
allow_override
=
False
),
in_c_key
=
False
)
AddConfigVar
(
'cycle_detection'
,
"If cycle_detection is set to regular, most inplaces are allowed,"
"but it is slower. If cycle_detection is set to faster, less inplaces"
"are allowed, but it makes the compilation faster."
"The interaction of which one give the lower peak memory usage is"
"complicated and not predictable, so if you are close to the peak"
"memory usage, triyng both could give you a small gain. "
,
EnumStr
(
'regular'
,
'fast'
),
in_c_key
=
False
)
def
_timeout_default
():
return
theano
.
config
.
compile
.
wait
*
24
...
...
theano/gof/destroyhandler.py
浏览文件 @
67927672
差异被折叠。
点击展开。
theano/gof/fg.py
浏览文件 @
67927672
...
...
@@ -654,8 +654,9 @@ class FunctionGraph(utils.object2):
take care of computing dependencies by itself.
"""
ords
=
OrderedDict
()
assert
isinstance
(
self
.
_features
,
list
)
all_orderings
=
[]
for
feature
in
self
.
_features
:
if
hasattr
(
feature
,
'orderings'
):
orderings
=
feature
.
orderings
(
self
)
...
...
@@ -664,17 +665,24 @@ class FunctionGraph(utils.object2):
str
(
feature
.
orderings
)
+
". Nondeterministic object is "
+
str
(
orderings
))
if
len
(
orderings
)
>
0
:
all_orderings
.
append
(
orderings
)
for
node
,
prereqs
in
iteritems
(
orderings
):
if
not
isinstance
(
prereqs
,
(
list
,
OrderedSet
)):
raise
TypeError
(
"prereqs must be a type with a "
"deterministic iteration order, or toposort "
" will be non-deterministic."
)
if
len
(
all_orderings
)
==
1
:
# If there is only 1 ordering, we reuse it directly.
return
all_orderings
[
0
]
.
copy
()
else
:
# If there is more than 1 ordering, combine them.
ords
=
OrderedDict
()
for
orderings
in
all_orderings
:
for
node
,
prereqs
in
iteritems
(
orderings
):
if
not
isinstance
(
prereqs
,
(
list
,
OrderedSet
)):
raise
TypeError
(
"prereqs must be a type with a "
"deterministic iteration order, or toposort "
" will be non-deterministic."
)
ords
.
setdefault
(
node
,
[])
.
extend
(
prereqs
)
# eliminate duplicate prereqs
for
(
node
,
prereqs
)
in
iteritems
(
ords
):
ords
[
node
]
=
list
(
OrderedSet
(
prereqs
))
return
ords
return
ords
def
check_integrity
(
self
):
"""
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论