提交 9f85a80e authored 作者: Roy Xue's avatar Roy Xue 提交者: Lijun Xue

Commit Fixes

Add doctoring of profiling vm.py code fix
上级 54d8f896
...@@ -14,6 +14,9 @@ from theano.ifelse import ifelse ...@@ -14,6 +14,9 @@ from theano.ifelse import ifelse
class Test_profiling(unittest.TestCase): class Test_profiling(unittest.TestCase):
"""
Test of Theano profiling with min_peak_memory=True
"""
def test_profiling(self): def test_profiling(self):
......
...@@ -931,7 +931,7 @@ class VM_Linker(link.LocalLinker): ...@@ -931,7 +931,7 @@ class VM_Linker(link.LocalLinker):
# where gc # where gc
for i in range(idx + 1, len(order)): for i in range(idx + 1, len(order)):
for outs in order[i].outputs: for outs in order[i].outputs:
if outs.ndim == 0: if outs.ndim == 0 and out not in viewed_by.values():
reuse_outs.append(outs) reuse_outs.append(outs)
elif ins in view_of: elif ins in view_of:
origin = view_of[ins] origin = view_of[ins]
...@@ -942,16 +942,13 @@ class VM_Linker(link.LocalLinker): ...@@ -942,16 +942,13 @@ class VM_Linker(link.LocalLinker):
#where gc #where gc
for i in range(idx + 1, len(order)): for i in range(idx + 1, len(order)):
for outs in order[i].outputs: for outs in order[i].outputs:
if outs.ndim == 0: if outs.ndim == 0 and out not in viewed_by.values():
reuse_outs.append(outs) reuse_outs.append(outs)
if reuse_outs: if reuse_outs:
# if reusable output variable exists # if reusable output variable exists
reallocated_ins.add(ins) reallocated_ins.add(ins)
import pdb; pdb.set_trace()
for node in order: for node in order:
try: try:
thunks.append(node.op.make_thunk(node, thunks.append(node.op.make_thunk(node,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论