Commit b4dec6bb authored by rusty1s's avatar rusty1s
Browse files

fix copy direction

parent 28478862
...@@ -73,7 +73,7 @@ void read_async_cuda(torch::Tensor src, ...@@ -73,7 +73,7 @@ void read_async_cuda(torch::Tensor src,
AT_ASSERTM(dst_offset + c <= dst.size(0), "Invalid index"); AT_ASSERTM(dst_offset + c <= dst.size(0), "Invalid index");
cudaMemcpyAsync( cudaMemcpyAsync(
dst_data + (dst_offset * size), src_data + (src_offset * size), dst_data + (dst_offset * size), src_data + (src_offset * size),
c * size * sizeof(scalar_t), cudaMemcpyDeviceToHost, stream); c * size * sizeof(scalar_t), cudaMemcpyHostToDevice, stream);
dst_offset += c; dst_offset += c;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment