提交 6770f46e authored 作者: Ricardo Vieira's avatar Ricardo Vieira 提交者: Ricardo Vieira

Use python implementation for constant_folding Ops

上级 3acaa848
......@@ -1101,6 +1101,13 @@ def unconditional_constant_folding(fgraph, node):
storage_map[o] = [None]
compute_map[o] = [False]
try:
thunk = node.op.make_thunk(
node, storage_map, compute_map, no_recycling=[], impl="py"
)
required = thunk()
except NotImplementedError:
# Not all Ops have a python implementation
thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
required = thunk()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论