提交 8276edd7 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Merge pull request #3933 from nouiz/profile

profile_memory, print the expected peak memory usage if excluding inplace opt.
...@@ -54,13 +54,16 @@ class Test_profiling(unittest.TestCase): ...@@ -54,13 +54,16 @@ class Test_profiling(unittest.TestCase):
lines1 = [l for l in the_string.split("\n") if "Max if linker" in l] 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] lines2 = [l for l in the_string.split("\n") if "Minimum peak" in l]
if theano.config.device == 'cpu': if theano.config.device == 'cpu':
assert "Max if linker=cvm(default): 4112KB (8204KB)" in the_string, ( assert "CPU: 4112KB (8204KB)" in the_string, (lines1, lines2)
lines1, lines2) assert "CPU: 8204KB (12296KB)" in the_string, (lines1, lines2)
assert "CPU: 8208KB" in the_string, (lines1, lines2)
assert "Minimum peak from all valid apply node order is 4104KB" in the_string, ( assert "Minimum peak from all valid apply node order is 4104KB" in the_string, (
lines1, lines2) lines1, lines2)
else: else:
assert "Max if linker=cvm(default): 8220KB (8220KB)" in the_string, ( assert "CPU: 16KB (16KB)" in the_string, (lines1, lines2)
lines1, lines2) assert "GPU: 8204KB (8204KB)" in the_string, (lines1, lines2)
assert "GPU: 12300KB (12300KB)" in the_string, (lines1, lines2)
assert "GPU: 8212KB" in the_string, (lines1, lines2)
assert "Minimum peak from all valid apply node order is 4116KB" in the_string, ( assert "Minimum peak from all valid apply node order is 4116KB" in the_string, (
lines1, lines2) lines1, lines2)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论