提交 527c8597 编写于 作者: L liaogang

Fix H2D and D2H order

上级 b0588641
......@@ -88,7 +88,7 @@ void Copy<platform::CPUPlace, platform::GPUPlace>(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, platform::CPUPlace>(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 <>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册