提交 30f8bbc8 authored 作者: Frederic's avatar Frederic

Sort the list of compiled op and add the type associated.

上级 a64ace01
...@@ -78,6 +78,10 @@ def print_compiledir_content(): ...@@ -78,6 +78,10 @@ def print_compiledir_content():
compiledir = theano.config.compiledir compiledir = theano.config.compiledir
print "List compiled op in theano this cache", compiledir print "List compiled op in theano this cache", compiledir
print "sub directory/Op/Associated Type"
print
table = []
for dir in os.listdir(compiledir): for dir in os.listdir(compiledir):
file = None file = None
try: try:
...@@ -86,9 +90,15 @@ def print_compiledir_content(): ...@@ -86,9 +90,15 @@ def print_compiledir_content():
ops = list(set([x for x in flatten(keydata.keys) ops = list(set([x for x in flatten(keydata.keys)
if isinstance(x, theano.gof.Op)])) if isinstance(x, theano.gof.Op)]))
assert len(ops) == 1 assert len(ops) == 1
print dir, ops[0] types = list(set([x for x in flatten(keydata.keys)
if isinstance(x, theano.gof.Type)]))
table.append((dir, ops[0], types))
except IOError: except IOError:
pass pass
finally: finally:
if file is not None: if file is not None:
file.close() file.close()
table = sorted(table, key=lambda t: str(t[1]))
for dir, op, types in table:
print dir, op, types
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论