From 4638fe9ac812c99c53dd436e5166ad9f5155e2d0 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 6 Apr 2021 15:03:37 +0800 Subject: [PATCH] [NPU] Wait on NPUPlace (#32086) --- paddle/fluid/memory/memcpy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/memory/memcpy.cc b/paddle/fluid/memory/memcpy.cc index c76d448013f..1a0a77bcc4c 100644 --- a/paddle/fluid/memory/memcpy.cc +++ b/paddle/fluid/memory/memcpy.cc @@ -245,7 +245,7 @@ void Copy(platform::CPUPlace dst_place, platform::NPUMemcpyAsync(dst, src, num, ACL_MEMCPY_DEVICE_TO_HOST, stream); } else { platform::DeviceContextPool& pool = platform::DeviceContextPool::Instance(); - static_cast(pool.Get(dst_place))->Wait(); + static_cast(pool.Get(src_place))->Wait(); platform::RecordEvent record_event("GpuMemcpySync:NPU->CPU"); platform::NPUMemcpySync(dst, src, num, ACL_MEMCPY_DEVICE_TO_HOST); -- GitLab