提交 b44b0d7a authored 作者: Frederic's avatar Frederic

Don't precompute stuff if it isn't used.

上级 df819993
...@@ -1109,6 +1109,9 @@ def _get_preallocated_maps(node, thunk, prealloc_modes, def_val, ...@@ -1109,6 +1109,9 @@ def _get_preallocated_maps(node, thunk, prealloc_modes, def_val,
# is less relevant. # is less relevant.
# Dimensions should be align by the innermost index, so we iterate # Dimensions should be align by the innermost index, so we iterate
# from the end of shapes. # from the end of shapes.
if ('strided' in prealloc_modes or
'wrong_size' in prealloc_modes or
'ALL' in prealloc_modes):
max_ndim = 0 max_ndim = 0
rev_out_broadcastable = [] rev_out_broadcastable = []
for r in considered_outputs: for r in considered_outputs:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论