Skip to content

Commit

Permalink
up x
Browse files Browse the repository at this point in the history
  • Loading branch information
gglin001 committed Jul 21, 2022
1 parent 1d8cbad commit f3fde45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/paddle/fluid/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,10 @@ def _can_use_interpreter_core(program, place):
# NOTE(dev): `set` always call TensorCopySync that is a
# blocking behavior. So we use `_copy_from` to replace it.
cpu_tensor = _as_lodtensor(data, core.CPUPlace())
tensor._copy_from(cpu_tensor, tensor._place())
if tensor._is_initialized():
tensor._copy_from(cpu_tensor, tensor._place())
else:
tensor._copy_from(cpu_tensor, self.place)

return new_exe.run(scope, list(feed.keys()), fetch_list,
return_numpy)
Expand Down

0 comments on commit f3fde45

Please sign in to comment.