提交 6e0e57fd authored 作者: Tanjay94's avatar Tanjay94

Fixed hash and eq method for Op function.

上级 cb6bebb4
......@@ -579,13 +579,13 @@ class Op(utils.object2, PureOp, CLinkerOp):
if hasattr(self, 'props'):
return hash((type(self), self.props()))
else:
raise utils.MethodNotDefined("c_headers", type(self), self.__class__.__name__)
return super(Op, self).__hash__()
def __eq__(self, other):
if hasattr(self, 'props'):
return (type(self) == type(other) and self.props() == other.props())
else:
raise utils.MethodNotDefined("c_headers", type(self), self.__class__.__name__)
return super(Op, self).__eq__()
def make_thunk(self, node, storage_map, compute_map, no_recycling):
"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论