Fix H2D and D2H order

cblas_new
liaogang 8 years ago
parent b05886414b
commit 527c85970b

@ -88,7 +88,7 @@ void Copy<platform::CPUPlace, platform::GPUPlace>(platform::CPUPlace, void* dst,
platform::GPUPlace, platform::GPUPlace,
const void* src, size_t num, const void* src, size_t num,
cudaStream_t stream) { cudaStream_t stream) {
platform::GpuMemcpyAsync(dst, src, num, cudaMemcpyHostToDevice, stream); platform::GpuMemcpyAsync(dst, src, num, cudaMemcpyDeviceToHost, stream);
} }
template <> template <>
@ -96,7 +96,7 @@ void Copy<platform::GPUPlace, platform::CPUPlace>(platform::GPUPlace, void* dst,
platform::CPUPlace, platform::CPUPlace,
const void* src, size_t num, const void* src, size_t num,
cudaStream_t stream) { cudaStream_t stream) {
platform::GpuMemcpyAsync(dst, src, num, cudaMemcpyDeviceToHost, stream); platform::GpuMemcpyAsync(dst, src, num, cudaMemcpyHostToDevice, stream);
} }
template <> template <>

Loading…
Cancel
Save