提交 80950f4b authored 作者: Frederic's avatar Frederic

Better test

上级 ac4f5a58
......@@ -736,6 +736,7 @@ class ProfileStats(object):
mem_count = 0
max_mem_count = 0
mem_bound = numpy.inf
# This take only the inputs/outputs dependencies.
dependencies = fgraph.profile.dependencies
# Initial compute_map which is used to check if a node is valid
......
......@@ -44,9 +44,10 @@ def test_profiling():
# regression testing for future algo speed up
the_string = buf.getvalue()
# assert "Max if linker=cvm(default): 8208KB (16400KB)" in the_string
# assert "Minimum peak from all valid apply node order is 8192KB" in the_string
print the_string
lines1 = [l for l in the_string.split("\n") if "Max if linker" in l]
lines2 = [l for l in the_string.split("\n") if "Minimum peak" in l]
assert "Max if linker=cvm(default): 8208KB (16400KB)" in the_string, (lines1, lines2)
assert "Minimum peak from all valid apply node order is 8192KB" in the_string, (lines1, lines2)
finally:
theano.config.profile = config1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论