ReshapeRT.cpp fix

This commit is contained in:
perseusdg
2021-10-28 23:43:12 +05:30
parent c5e66c6bf6
commit 7a89a4a573
+1 -2
View File
@@ -53,11 +53,10 @@ int ReshapeRT::enqueue(int batchSize, const void *const *inputs, void *const *ou
}
#elif NV_TENSORRT_MAJOR <= 7
int32_t ReshapeRT::enqueue(int32_t batchSize, const void *const *inputs, void **outputs, void *workspace, cudaStream_t stream) {
std::cout << new_dim.c << ":" << new_dim.h << std::endl;
dnnType *srcData = (dnnType*)reinterpret_cast<const dnnType*>(inputs[0]);
dnnType *dstData = reinterpret_cast<dnnType*>(outputs[0]);
std::cout << "C : " << c << "H : " << h << "w :" << w << std::endl;
checkCuda( cudaMemcpyAsync(dstData, srcData, batchSize*new_dim.c*new_dim.h*new_dim.w*sizeof(dnnType), cudaMemcpyDeviceToDevice, stream));
checkCuda( cudaMemcpyAsync(dstData, srcData, batchSize*c*h*w*sizeof(dnnType), cudaMemcpyDeviceToDevice, stream));
return 0;
}
#endif