提交 7c041e3e authored 作者: Josh Bleecher Snyder's avatar Josh Bleecher Snyder

support to print out duplicate keys, for help identifying ops that get…

support to print out duplicate keys, for help identifying ops that get erroneously recompiled multiple times (perhaps due to missing code versions)?
上级 1b24376f
import pickle
import os, sys
import theano
DISPLAY_DUPLICATE_KEYS = False
dirs = []
if len(sys.argv)>1:
for compiledir in sys.argv[1:]:
......@@ -40,6 +43,10 @@ for dir in dirs:
print dir, "don't have a mod.{cpp,cu} file"
pass
if DISPLAY_DUPLICATE_KEYS:
for k, v in keys.iteritems():
if v > 1:
print "Duplicate key (%i copies): %s" % (v, pickle.loads(k))
nbs = {} # nb seen -> now many key
for val in keys.values():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论