提交 4797700c authored 作者: Frederic's avatar Frederic

Added comments following code review.

上级 774120f1
......@@ -906,6 +906,11 @@ class CLinker(link.Linker):
if isinstance(i, graph.Constant): #orphans
if id(i) not in constant_ids:
isig = (i.signature(), topological_pos, i_idx)
# If the Theano constant provide a strong hash
# (no collision for transpose, 2, 1, 0, -1, -2,
# 2 element swapped...) we put this hash in the signature
# instead of the value. This make the key file much smaller
# for big constant. Before this, we saw key file up to 80M.
if hasattr(isig[0], "theano_hash"):
isig = (isig[0].theano_hash(), topological_pos, i_idx)
try:
......
......@@ -107,7 +107,7 @@ AddConfigVar('compiledir',
def print_compiledir_content():
max_key_file_size = 1 * 1024 * 1024
max_key_file_size = 1 * 1024 * 1024 # 1M
def flatten(a):
if isinstance(a, (tuple, list, set)):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论