Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
620edabe
提交
620edabe
authored
11月 14, 2021
作者:
Brandon T. Willard
提交者:
Brandon T. Willard
11月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove scan__debug config option
上级
c9a6f69e
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
2 行增加
和
37 行删除
+2
-37
configdefaults.py
aesara/configdefaults.py
+0
-7
features.py
aesara/graph/features.py
+2
-22
config.rst
doc/library/config.rst
+0
-8
没有找到文件。
aesara/configdefaults.py
浏览文件 @
620edabe
...
@@ -1462,13 +1462,6 @@ def add_scan_configvars():
...
@@ -1462,13 +1462,6 @@ def add_scan_configvars():
in_c_key
=
False
,
in_c_key
=
False
,
)
)
config
.
add
(
"scan__debug"
,
"If True, enable extra verbose output related to scan"
,
BoolParam
(
False
),
in_c_key
=
False
,
)
def
_get_default_gpuarray__cache_path
():
def
_get_default_gpuarray__cache_path
():
return
os
.
path
.
join
(
config
.
compiledir
,
"gpuarray_kernels"
)
return
os
.
path
.
join
(
config
.
compiledir
,
"gpuarray_kernels"
)
...
...
aesara/graph/features.py
浏览文件 @
620edabe
...
@@ -553,12 +553,9 @@ class ReplaceValidate(History, Validator):
...
@@ -553,12 +553,9 @@ class ReplaceValidate(History, Validator):
self
,
fgraph
,
replacements
,
reason
=
None
,
verbose
=
None
,
**
kwargs
self
,
fgraph
,
replacements
,
reason
=
None
,
verbose
=
None
,
**
kwargs
):
):
chk
=
fgraph
.
checkpoint
()
chk
=
fgraph
.
checkpoint
()
if
verbose
is
None
:
if
verbose
is
None
:
verbose
=
config
.
optimizer_verbose
verbose
=
config
.
optimizer_verbose
if
config
.
scan__debug
:
from
aesara.scan.op
import
Scan
scans
=
[
n
for
n
in
fgraph
.
apply_nodes
if
isinstance
(
n
.
op
,
Scan
)]
for
r
,
new_r
in
replacements
:
for
r
,
new_r
in
replacements
:
try
:
try
:
...
@@ -600,27 +597,10 @@ class ReplaceValidate(History, Validator):
...
@@ -600,27 +597,10 @@ class ReplaceValidate(History, Validator):
f
"optimizer: validate failed on node {r}.
\n
Reason: {reason}, {e}"
f
"optimizer: validate failed on node {r}.
\n
Reason: {reason}, {e}"
)
)
raise
raise
if
config
.
scan__debug
:
from
aesara.scan.op
import
Scan
scans2
=
[
n
for
n
in
fgraph
.
apply_nodes
if
isinstance
(
n
.
op
,
Scan
)]
nb
=
len
(
scans
)
nb2
=
len
(
scans2
)
if
nb2
>
nb
:
print
(
"Extra scan introduced"
,
nb
,
nb2
,
getattr
(
reason
,
"name"
,
reason
),
r
,
new_r
,
)
elif
nb2
<
nb
:
print
(
"Scan removed"
,
nb
,
nb2
,
getattr
(
reason
,
"name"
,
reason
),
r
,
new_r
)
if
verbose
:
if
verbose
:
print
(
f
"optimizer: rewrite {reason} replaces {r} with {new_r}"
)
print
(
f
"optimizer: rewrite {reason} replaces {r} with {new_r}"
)
# The return is needed by replace_all_validate_remove
# The return is needed by replace_all_validate_remove
return
chk
return
chk
...
...
doc/library/config.rst
浏览文件 @
620edabe
...
@@ -232,14 +232,6 @@ import ``aesara`` and print the config variable, as in:
...
@@ -232,14 +232,6 @@ import ``aesara`` and print the config variable, as in:
``False``, then Aesara will perform garbage collection during the inner
``False``, then Aesara will perform garbage collection during the inner
operations of a :class:`Scan` after each iterations.
operations of a :class:`Scan` after each iterations.
.. attribute:: config.scan__debug
Bool value, either ``True`` or ``False``
Default: ``False``
If ``True``, Aesara will print extra :class:`Scan` debug information.
.. attribute:: cycle_detection
.. attribute:: cycle_detection
String value, either ``regular`` or ``fast```
String value, either ``regular`` or ``fast```
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论