提交 424c3a40 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

The new specialized make_thunk methods need a compute_map, so they can

share the fake one.
上级 1ae8f51b
...@@ -1685,16 +1685,18 @@ class _Linker(gof.link.LocalLinker): ...@@ -1685,16 +1685,18 @@ class _Linker(gof.link.LocalLinker):
node_input_storage = [storage_map[r] for r in node.inputs] node_input_storage = [storage_map[r] for r in node.inputs]
node_output_storage = [storage_map[r] for r in node.outputs] node_output_storage = [storage_map[r] for r in node.outputs]
# Some Ops define a make_thunk with the expectation that
# it will be called before the C code is compiled, because
# the compilation of some dependency is triggered there.
thunk_other = None
if get_unbound_function(node.op.make_thunk) not in default_make_thunk:
compute_map = {} compute_map = {}
for k in node.inputs: for k in node.inputs:
compute_map[k] = [True] compute_map[k] = [True]
for k in node.outputs: for k in node.outputs:
compute_map[k] = [False] compute_map[k] = [False]
# Some Ops define a make_thunk with the expectation that
# it will be called before the C code is compiled, because
# the compilation of some dependency is triggered there.
thunk_other = None
if get_unbound_function(node.op.make_thunk) not in default_make_thunk:
thunk = node.op.make_thunk(node, thunk = node.op.make_thunk(node,
storage_map, storage_map,
compute_map, compute_map,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论