memcpyasync
This commit is contained in:
@@ -47,7 +47,7 @@ public:
|
|||||||
dnnType *srcData = (dnnType*)reinterpret_cast<const dnnType*>(inputs[0]);
|
dnnType *srcData = (dnnType*)reinterpret_cast<const dnnType*>(inputs[0]);
|
||||||
dnnType *dstData = reinterpret_cast<dnnType*>(outputs[0]);
|
dnnType *dstData = reinterpret_cast<dnnType*>(outputs[0]);
|
||||||
|
|
||||||
checkCuda( cudaMemcpy(dstData, srcData, batchSize*c*h*w*sizeof(dnnType), cudaMemcpyDeviceToDevice));
|
checkCuda( cudaMemcpyAsync(dstData, srcData, batchSize*c*h*w*sizeof(dnnType), cudaMemcpyDeviceToDevice, stream));
|
||||||
|
|
||||||
for (int b = 0; b < batchSize; ++b){
|
for (int b = 0; b < batchSize; ++b){
|
||||||
for(int n = 0; n < num; ++n){
|
for(int n = 0; n < num; ++n){
|
||||||
|
|||||||
Reference in New Issue
Block a user