提交 843e2b32 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix bug with merging of CDataType constants.

上级 a089f02f
...@@ -628,10 +628,7 @@ if (py_%(name)s == NULL) { %(freefunc)s(%(name)s); } ...@@ -628,10 +628,7 @@ if (py_%(name)s == NULL) { %(freefunc)s(%(name)s); }
class CDataTypeConstant(graph.Constant): class CDataTypeConstant(graph.Constant):
def signature(self): def signature(self):
# The Op.c_code* methoss can't access the data, so it can't # We can't check if certain constants are equal or not so just
# change the code depending of it. So there is no need to put # assume they are all unequal.
# it in the signature. Also, under Python 2, PyCObject aren't return id(self.data)
# pickable. So using the PyCObject in the signature would
# disable the c code cache for op that have it as an input.
return (self.type,)
CDataType.Constant = CDataTypeConstant CDataType.Constant = CDataTypeConstant
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论