提交 ea1e0b65 authored 作者: Hengjean's avatar Hengjean 提交者: Frederic

Fixed db key bug.

上级 a4b9daec
...@@ -1088,6 +1088,7 @@ class FunctionMaker(object): ...@@ -1088,6 +1088,7 @@ class FunctionMaker(object):
size_new = len(fgraph.apply_nodes) size_new = len(fgraph.apply_nodes)
need_optimize = False need_optimize = False
get_lock() get_lock()
key = None
''' '''
graph_db and need_optimize graph_db and need_optimize
''' '''
...@@ -1181,6 +1182,7 @@ class FunctionMaker(object): ...@@ -1181,6 +1182,7 @@ class FunctionMaker(object):
# found the match # found the match
print 'found #TODO: he match, no need to optimize' print 'found #TODO: he match, no need to optimize'
need_optimize = False need_optimize = False
key = graph_old
break break
# now optimize or not # now optimize or not
...@@ -1209,7 +1211,7 @@ class FunctionMaker(object): ...@@ -1209,7 +1211,7 @@ class FunctionMaker(object):
print 'no opt, get graph from graph_db' print 'no opt, get graph from graph_db'
# just read the optmized graph from graph_db # just read the optmized graph from graph_db
opt_time = 0 opt_time = 0
fgraph = graph_db[fgraph] fgraph = graph_db[key]
# release stuff # release stuff
release_lock() release_lock()
return opt_time return opt_time
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论