-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[NV RTX EP] Iraut/vendor id impl #25449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
9df0f29
81084a8
12121aa
ff53f92
251eeb2
1d00bff
f190e70
7f193b1
8eea128
9d11ae2
033ca86
b45edfb
16701a2
053ed28
af205c2
1975fba
3c7a617
ca45ff2
3dd0d6d
88facb6
9f1a13c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -159,27 +159,34 @@ struct NvTensorRtRtxEpFactory : OrtEpFactory { | |
| const char* ep_name, | ||
| OrtHardwareDeviceType hw_type) | ||
| : ort_api{ort_api_in}, ep_name{ep_name}, ort_hw_device_type{hw_type} { | ||
| ort_version_supported = ORT_API_VERSION; | ||
| GetName = GetNameImpl; | ||
| GetVendor = GetVendorImpl; | ||
| GetVersion = GetVersionImpl; | ||
| GetVendorId = GetVendorIdImpl; | ||
| GetSupportedDevices = GetSupportedDevicesImpl; | ||
| CreateEp = CreateEpImpl; | ||
| ReleaseEp = ReleaseEpImpl; | ||
| } | ||
|
|
||
| // Returns the name for the EP. Each unique factory configuration must have a unique name. | ||
| // Ex: a factory that supports NPU should have a different than a factory that supports GPU. | ||
| static const char* GetNameImpl(const OrtEpFactory* this_ptr) { | ||
| static const char* GetNameImpl(const OrtEpFactory* this_ptr) noexcept { | ||
| const auto* factory = static_cast<const NvTensorRtRtxEpFactory*>(this_ptr); | ||
| return factory->ep_name.c_str(); | ||
| } | ||
|
|
||
| static const char* GetVendorImpl(const OrtEpFactory* this_ptr) { | ||
| static const char* GetVendorImpl(const OrtEpFactory* this_ptr) noexcept { | ||
| const auto* factory = static_cast<const NvTensorRtRtxEpFactory*>(this_ptr); | ||
| return factory->vendor.c_str(); | ||
| } | ||
|
|
||
| static const char* ORT_API_CALL GetVersionImpl(const OrtEpFactory* /*this_ptr*/) noexcept { | ||
| static uint32_t GetVendorIdImpl(const OrtEpFactory* this_ptr) noexcept { | ||
| const auto* factory = static_cast<const NvTensorRtRtxEpFactory*>(this_ptr); | ||
| return factory->vendor_id; | ||
|
||
| } | ||
|
|
||
| static const char* GetVersionImpl(const OrtEpFactory* /*this_ptr*/) noexcept { | ||
| return ORT_VERSION; | ||
| } | ||
|
|
||
|
|
@@ -194,7 +201,7 @@ struct NvTensorRtRtxEpFactory : OrtEpFactory { | |
| size_t num_devices, | ||
| OrtEpDevice** ep_devices, | ||
| size_t max_ep_devices, | ||
| size_t* p_num_ep_devices) { | ||
| size_t* p_num_ep_devices) noexcept { | ||
| size_t& num_ep_devices = *p_num_ep_devices; | ||
| auto* factory = static_cast<NvTensorRtRtxEpFactory*>(this_ptr); | ||
|
|
||
|
|
@@ -219,16 +226,16 @@ struct NvTensorRtRtxEpFactory : OrtEpFactory { | |
| _In_ size_t /*num_devices*/, | ||
| _In_ const OrtSessionOptions* /*session_options*/, | ||
| _In_ const OrtLogger* /*logger*/, | ||
| _Out_ OrtEp** /*ep*/) { | ||
| _Out_ OrtEp** /*ep*/) noexcept { | ||
| return onnxruntime::CreateStatus(ORT_INVALID_ARGUMENT, "[NvTensorRTRTX EP] EP factory does not support this method."); | ||
| } | ||
|
|
||
| static void ReleaseEpImpl(OrtEpFactory* /*this_ptr*/, OrtEp* /*ep*/) { | ||
| static void ReleaseEpImpl(OrtEpFactory* /*this_ptr*/, OrtEp* /*ep*/) noexcept { | ||
| // no-op as we never create an EP here. | ||
| } | ||
|
|
||
| const OrtApi& ort_api; | ||
| const std::string ep_name; | ||
| const std::string ep_name{kNvTensorRTRTXExecutionProvider}; | ||
|
||
| const std::string vendor{"NVIDIA"}; | ||
|
|
||
| // NVIDIA vendor ID. Refer to the ACPI ID registry (search NVIDIA): https://uefi.org/ACPI_ID_List | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code assigns to
ort_version_supportedbut this member variable is not defined in the visible class definition. This will cause a compilation error.