提交 9f4e6b56 authored 作者: Frederic's avatar Frederic

Fix profiler with allow_gc=False.

上级 a9fc84a6
......@@ -728,8 +728,7 @@ class VM_Linker(link.LocalLinker):
if self.use_cloop and config.profile_memory:
warnings.warn(
'CVM does not support memory profile, using Stack VM.')
deps = None
if self.allow_gc:
# Needed when allow_gc=True and profiling
deps = self.compute_gc_dependencies(storage_map)
vm = Stack(
nodes, thunks, pre_call_clear,
......@@ -765,13 +764,11 @@ class VM_Linker(link.LocalLinker):
assert type(storage_map_list[0]) is list
assert type(compute_map_list[0]) is list
if self.allow_gc:
# Needed when allow_gc=True and profiling
dependency_map = self.compute_gc_dependencies(storage_map)
dependency_map_list = [
[vars_idx[d] for d in dependency_map[vars_idx_inv[i]]]
for i in xrange(len(vars_idx_inv))]
else:
dependency_map_list = None
# build the pointers to node inputs and offsets
base_input_output_list = []
......@@ -869,8 +866,7 @@ class VM_Linker(link.LocalLinker):
thunks,
pre_call_clear)
else:
deps = None
if self.allow_gc:
# Needed when allow_gc=True and profiling
deps = self.compute_gc_dependencies(storage_map)
vm = Stack(
nodes, thunks, pre_call_clear,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论