提交 f1b4a568 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

fix bug of __str__

If you try to call __str__ before compiling the function the destroy_map attribute might not exist.
上级 b6613813
......@@ -406,6 +406,8 @@ class Scan(PureOp):
else:
name = 'for'
aux_txt = '%s'
if getattr(self, 'destroy_map', None) is None:
self.destroy_map = {}
if len(self.destroy_map.keys()) > 0:
# Check if all outputs are inplace
if (sorted(self.destroy_map.keys()) == \
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论