Skip to content

Commit 35b0cf1

Browse files
committed
update data transfer initialization in TRT EP
1 parent 95dd71e commit 35b0cf1

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

plugin_execution_providers/tensorrt/tensorrt_provider_factory.cc

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,6 @@ OrtStatus* ORT_API_CALL TensorrtExecutionProviderFactory::GetSupportedDevicesImp
119119

120120
ep_devices[num_ep_devices++] = ep_device;
121121
}
122-
123-
// Create gpu data transfer
124-
auto data_transfer_impl = std::make_unique<TRTEpDataTransfer>(
125-
static_cast<const ApiPtrs&>(*factory),
126-
cuda_gpu_mem_devices, // device memory
127-
cuda_pinned_mem_devices // shared memory
128-
);
129-
130122

131123
// C++ API equivalent. Throws on error.
132124
//{
@@ -142,6 +134,12 @@ OrtStatus* ORT_API_CALL TensorrtExecutionProviderFactory::GetSupportedDevicesImp
142134
//}
143135
}
144136

137+
// Create gpu data transfer
138+
auto data_transfer_impl = std::make_unique<TRTEpDataTransfer>(static_cast<const ApiPtrs&>(*factory),
139+
cuda_gpu_mem_devices, // device memory
140+
cuda_pinned_mem_devices // shared memory
141+
);
142+
145143
return nullptr;
146144
}
147145

0 commit comments

Comments
 (0)