提交 398d2e8a authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Add debug-level logs.

上级 e2aadc30
...@@ -902,7 +902,7 @@ def _check_preallocated_output(node, thunk, prealloc_modes, def_val, ...@@ -902,7 +902,7 @@ def _check_preallocated_output(node, thunk, prealloc_modes, def_val,
raise NotImplementedError('Negative strides in check_preallocated_output') raise NotImplementedError('Negative strides in check_preallocated_output')
for (name, out_map) in prealloc_maps: for (name, out_map) in prealloc_maps:
#debug('name =', name, ', perform =', perform)
# Copy the inputs over again # Copy the inputs over again
for r in node.inputs: for r in node.inputs:
storage_map[r][0] = _lessbroken_deepcopy(r_vals[r]) storage_map[r][0] = _lessbroken_deepcopy(r_vals[r])
...@@ -1316,6 +1316,7 @@ class _Linker(gof.link.LocalLinker): ...@@ -1316,6 +1316,7 @@ class _Linker(gof.link.LocalLinker):
storage_map[r][0] = None #clear the storage_map of outputs for the thunk_c storage_map[r][0] = None #clear the storage_map of outputs for the thunk_c
if config.DebugMode.check_preallocated_output: if config.DebugMode.check_preallocated_output:
debug('calling _check_preallocated_output with thunk_py')
_check_preallocated_output( _check_preallocated_output(
node=node, node=node,
thunk=thunk_py, thunk=thunk_py,
...@@ -1402,6 +1403,7 @@ class _Linker(gof.link.LocalLinker): ...@@ -1402,6 +1403,7 @@ class _Linker(gof.link.LocalLinker):
thunk_c() thunk_c()
except: except:
raise_with_op(node) raise_with_op(node)
debug('calling _check_preallocated_output with thunk_c')
_check_preallocated_output( _check_preallocated_output(
node=node, node=node,
thunk=thunk, thunk=thunk,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论