Skip to content

Commit 95dd71e

Browse files
committed
add GetVersionImpl in factory
1 parent f443a33 commit 95dd71e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

plugin_execution_providers/tensorrt/tensorrt_provider_factory.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ TensorrtExecutionProviderFactory::TensorrtExecutionProviderFactory(const char* e
1818
ort_version_supported = ORT_API_VERSION; // set to the ORT version we were compiled with.
1919
GetName = GetNameImpl;
2020
GetVendor = GetVendorImpl;
21+
GetVersion = GetVersionImpl;
2122

2223
GetSupportedDevices = GetSupportedDevicesImpl;
2324

@@ -40,6 +41,11 @@ const char* ORT_API_CALL TensorrtExecutionProviderFactory::GetVendorImpl(const O
4041
return factory->vendor_.c_str();
4142
}
4243

44+
const char* ORT_API_CALL TensorrtExecutionProviderFactory::GetVersionImpl(const OrtEpFactory* this_ptr) noexcept {
45+
const auto* factory = static_cast<const TensorrtExecutionProviderFactory*>(this_ptr);
46+
return factory->ep_version_.c_str();
47+
}
48+
4349
OrtStatus* ORT_API_CALL TensorrtExecutionProviderFactory::GetSupportedDevicesImpl(
4450
OrtEpFactory* this_ptr,
4551
const OrtHardwareDevice* const* devices,

plugin_execution_providers/tensorrt/tensorrt_provider_factory.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include "tensorrt_execution_provider_utils.h"
3+
#include "ep_utils.h"
44
#include "tensorrt_execution_provider_data_transfer.h"
55

66
using MemoryInfoUniquePtr = std::unique_ptr<OrtMemoryInfo, std::function<void(OrtMemoryInfo*)>>;
@@ -21,6 +21,8 @@ struct TensorrtExecutionProviderFactory : public OrtEpFactory, public ApiPtrs {
2121

2222
static const char* ORT_API_CALL GetVendorImpl(const OrtEpFactory* this_ptr) noexcept;
2323

24+
static const char* ORT_API_CALL TensorrtExecutionProviderFactory::GetVersionImpl(const OrtEpFactory* this_ptr) noexcept;
25+
2426
static OrtStatus* ORT_API_CALL GetSupportedDevicesImpl(OrtEpFactory* this_ptr,
2527
const OrtHardwareDevice* const* devices, size_t num_devices,
2628
OrtEpDevice** ep_devices, size_t max_ep_devices,
@@ -52,6 +54,7 @@ struct TensorrtExecutionProviderFactory : public OrtEpFactory, public ApiPtrs {
5254

5355
const std::string ep_name_; // EP name
5456
const std::string vendor_{"Nvidia"}; // EP vendor name
57+
const std::string ep_version_{"0.1.0"}; // EP version
5558

5659
// OrtMemoryInfo for allocators and data transfer.
5760

0 commit comments

Comments
 (0)