提交 dc101dcd authored 作者: f0k's avatar f0k

Handle direction_hint when unpickling old ops

上级 df59a925
......@@ -1603,6 +1603,8 @@ class GpuConv(GpuOp):
self.imshp = None
if not hasattr(self, "max_threads_dim0"):
self.max_threads_dim0 = None
if not hasattr(self, "direction_hint"):
self.direction_hint = None
def __hash__(self):
# don't use hash(self.version) as hash(-1)==-2 and
......
......@@ -569,6 +569,7 @@ class ConvOp(OpenMPOp):
def __setstate__(self, d):
super(ConvOp, self).__setstate__(d)
self.direction_hint = d.get("direction_hint", None)
self._rehash()
def _rehash(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论