提交 d9b494d2 authored 作者: Virgile Andreani's avatar Virgile Andreani 提交者: Ricardo Vieira

Fix typo in profile summary printing function

上级 686811ca
...@@ -2640,7 +2640,7 @@ class EquilibriumGraphRewriter(NodeProcessingGraphRewriter): ...@@ -2640,7 +2640,7 @@ class EquilibriumGraphRewriter(NodeProcessingGraphRewriter):
gf_rewrites = [ gf_rewrites = [
o o
for o in ( for o in (
rewrite.global_rewrites rewrite.global_rewriters
+ list(rewrite.final_rewriters) + list(rewrite.final_rewriters)
+ list(rewrite.cleanup_rewriters) + list(rewrite.cleanup_rewriters)
) )
......
...@@ -459,3 +459,10 @@ def test_Print(capsys): ...@@ -459,3 +459,10 @@ def test_Print(capsys):
stdout, stderr = capsys.readouterr() stdout, stderr = capsys.readouterr()
assert "hello" in stdout assert "hello" in stdout
def test_summary():
old_profile_optimizer_config_value = pytensor.config.profile_optimizer = True
f = pytensor.function(inputs=[], outputs=[], profile=True)
f.profile.summary()
pytensor.config.profile_optimizer = old_profile_optimizer_config_value
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论