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

Add allow_gc check

上级 8ce97fe7
......@@ -891,19 +891,20 @@ class VM_Linker(link.LocalLinker):
thunks = []
for idx in range(len(order)):
node = order[idx]
for ins in node.inputs:
if ins.ndim == 0 and storage_map[ins][0]:
# check if input variable ndim = 0
for i in range(idx + 1, len(order)):
for outs in order[i].outputs:
if outs.ndim == 0:
storage_map[outs] = storage_map[ins]
if self.allow_gc:
for idx in range(len(order)):
node = order[idx]
for ins in node.inputs:
if ins.ndim == 0 and storage_map[ins][0]:
# check if input variable ndim = 0
for i in range(idx + 1, len(order)):
for outs in order[i].outputs:
if outs.ndim == 0:
storage_map[outs] = storage_map[ins]
break
else:
continue
break
else:
continue
break
for node in order:
try:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论