提交 2e6ecbba authored 作者: Frederic Bastien's avatar Frederic Bastien

Add in the keys the props of the nodes. To make the keys forward compatible in…

Add in the keys the props of the nodes. To make the keys forward compatible in case we add new attribute, but forget to bump the c_code_cache_version number.
上级 d70072cd
...@@ -1444,6 +1444,8 @@ class CLinker(link.Linker): ...@@ -1444,6 +1444,8 @@ class CLinker(link.Linker):
for node_pos, node in enumerate(order): for node_pos, node in enumerate(order):
if hasattr(node.op, 'c_code_cache_version_apply'): if hasattr(node.op, 'c_code_cache_version_apply'):
version.append(node.op.c_code_cache_version_apply(node)) version.append(node.op.c_code_cache_version_apply(node))
if hasattr(node.op, '__props__'):
version.append(node.op.__props__)
for i in node.inputs: for i in node.inputs:
version.append(i.type.c_code_cache_version()) version.append(i.type.c_code_cache_version())
for o in node.outputs: for o in node.outputs:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论