Skip to content

Commit e50721e

Browse files
committed
address reviewer's comments
1 parent d8879e3 commit e50721e

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

plugin_execution_providers/tensorrt/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ add_definitions(-DONNX_NAMESPACE=onnx)
3131
add_definitions(-DONNX_ML)
3232
add_definitions(-DNOMINMAX)
3333

34-
file(GLOB tensorrt_src "./src/*.cc" "./src/kernels/*.cc" "./src/utils/*.cc" "./src/cuda/unary_elementwise_ops_impl.cu" "./src/*.h" "./src/kernels/*.h")
34+
file(GLOB tensorrt_src
35+
"./src/*.cc"
36+
"./src/kernels/*.cc"
37+
"./src/utils/*.cc"
38+
"./src/cuda/unary_elementwise_ops_impl.cu"
39+
"./src/*.h"
40+
"./src/kernels/*.h"
41+
)
3542
add_library(TensorRTEp SHARED ${tensorrt_src})
3643

3744
set_onnxruntime_paths(

plugin_execution_providers/tensorrt/src/tensorrt_execution_provider_data_transfer.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ bool ORT_API_CALL TRTEpDataTransfer::CanCopyImpl(const OrtDataTransferImpl* this
2424
auto dst_vendor_id = impl.ep_api.MemoryDevice_GetVendorId(dst_memory_device);
2525

2626
// 0x10DE is the PCI vendor ID for NVIDIA
27-
if ((src_type == OrtMemoryInfoDeviceType_GPU && src_vendor_id != 0x10DE) ||
28-
(dst_type == OrtMemoryInfoDeviceType_GPU && dst_vendor_id != 0x10DE)) {
27+
constexpr uint32_t nvidia_vendor_id = 0x10DE;
28+
29+
// Reject if GPU device is not NVIDIA
30+
if ((src_type == OrtMemoryInfoDeviceType_GPU && src_vendor_id != nvidia_vendor_id) ||
31+
(dst_type == OrtMemoryInfoDeviceType_GPU && dst_vendor_id != nvidia_vendor_id)) {
2932
return false;
3033
}
3134

plugin_execution_providers/tensorrt/src/tensorrt_execution_provider_kernel_registration.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
#pragma once
55

6-
#include <vector>
7-
86
#include "ep_utils.h"
97

108
namespace trt_ep {

0 commit comments

Comments
 (0)