def c_code_cache_version_apply(self, node):
version = [15] # the version corresponding to the c code in this Op
# now we insert versions for the ops on which we depend...
Apply(self.scalar_op,
[Scalar(
dtype=input.type.dtype)() for input in node.inputs],
[Scalar(
dtype=output.type.dtype)() for output in node.outputs])
version.extend(self.scalar_op.c_code_cache_version())
for i in node.inputs + node.outputs:
version.extend(
Scalar(dtype=i.type.dtype).c_code_cache_version())
if all(version):
return tuple(version)
else:
return ()
评论列表
文章目录