提交 91172b5f authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Update comment in scan execute/perform.

上级 d4563178
......@@ -1104,7 +1104,8 @@ class Scan(PureOp):
# little trick that I used
outs[idx][0] = outs[idx][0][:-(n_steps - i)]
# Make sure to release storage if allow_gc is True
# Make sure to release storage if allow_gc is True, like
# Function.__call__ does.
if getattr(fn, 'allow_gc', False):
for i in input_storage:
i.storage[0] = None
......
......@@ -456,7 +456,8 @@ def perform(
sh0 = outs[idx][0].shape[0]
outs[idx][0] = outs[idx][0][:sh0-(n_steps - i)]
# Make sure to release storage if allow_gc is True
# Make sure to release storage if allow_gc is True, like
# Function.__call__ does.
if getattr(fn, 'allow_gc', False):
for i in input_storage:
i.storage[0] = None
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论