diff --git a/paddle/memory/memory.cc b/paddle/memory/memory.cc index 5c7b3bb15eae055fa2ce0e5756e50160f3dfacfe..67d2ae1bbdaa3eb96d1d39175e2f78751cd35e8e 100644 --- a/paddle/memory/memory.cc +++ b/paddle/memory/memory.cc @@ -88,7 +88,7 @@ void Copy(platform::CPUPlace, void* dst, platform::GPUPlace, const void* src, size_t num, cudaStream_t stream) { - platform::GpuMemcpyAsync(dst, src, num, cudaMemcpyHostToDevice, stream); + platform::GpuMemcpyAsync(dst, src, num, cudaMemcpyDeviceToHost, stream); } template <> @@ -96,7 +96,7 @@ void Copy(platform::GPUPlace, void* dst, platform::CPUPlace, const void* src, size_t num, cudaStream_t stream) { - platform::GpuMemcpyAsync(dst, src, num, cudaMemcpyDeviceToHost, stream); + platform::GpuMemcpyAsync(dst, src, num, cudaMemcpyHostToDevice, stream); } template <>