Skip to content

Commit c5363e6

Browse files
committed
fix bug for gpu data transfer implementation
1 parent c77391f commit c5363e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin_execution_providers/tensorrt/tensorrt_execution_provider_data_transfer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ OrtStatus* ORT_API_CALL TRTEpDataTransfer::CopyTensorsImpl(void* this_ptr,
6161
RETURN_IF_ERROR(impl.ort_api.GetTensorMutableData(dst_tensors[i], &dst_data));
6262

6363
size_t bytes = 0;
64-
RETURN_IF_ERROR(impl.ort_api.GetTensorSizeInBytes(reinterpret_cast<const OrtValue*>(src_data), &bytes));
64+
RETURN_IF_ERROR(impl.ort_api.GetTensorSizeInBytes(src_tensors[i], &bytes));
6565

6666
// for the sync version of memcpy, launch to cuda default stream
6767
if (dst_device_type == OrtMemoryInfoDeviceType_GPU) {

0 commit comments

Comments
 (0)