Fix TensorRT RTX EP name to match catalog JSON#624
Fix TensorRT RTX EP name to match catalog JSON#624yeelam-gordon wants to merge 1 commit intomainfrom
Conversation
The catalog uses NvTensorRTRTXExecutionProvider but the switch only matched TensorRtRtxExecutionProvider. Added the Nv-prefixed form. Fixes ADO #61791041 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes a mismatch between the execution provider (EP) name used in the model catalog JSON and the EP name matched by the C# performance options lookup, ensuring TensorRT RTX performance options are applied when the catalog-supplied name is used.
Changes:
- Adds
NVTENSORRTRTXEXECUTIONPROVIDERas an alias for the TensorRT RTX EP inPerformanceConfigurator.GetEpOptions(). - Adds XML doc and inline comments explaining that EP name strings may come from different sources (runtime vs model catalog).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// The string literals below come from two sources that may use different names | ||
| /// for the same provider: | ||
| /// 1. ORT runtime — OrtEpDevice.EpName returned by ExecutionProviderCatalog.FindAllProviders() | ||
| /// 2. Model catalog JSON — the "executionProviders[].name" field in files like | ||
| /// Resources/SqueezeNetModelCatalog.json | ||
| /// | ||
| /// When a provider appears under different names in these two sources, both forms | ||
| /// must be listed here so the lookup succeeds regardless of which name is passed in. | ||
| /// If a new EP is added to the ORT runtime or the catalog introduces an alias, | ||
| /// a corresponding entry should be added below. |
There was a problem hiding this comment.
The XML doc comment misidentifies where the ORT EP name comes from. ExecutionProviderCatalog.FindAllProviders() returns ExecutionProvider objects whose name is provider.Name (WinRT catalog), whereas the ORT runtime EP name used by SessionOptions/OrtEpDevice comes from ORT enumeration (e.g., OrtEnv.GetEpDevices() → OrtEpDevice.EpName). As written, the comment suggests OrtEpDevice.EpName is returned by FindAllProviders(), which is misleading—please update the doc to clearly distinguish WinRT catalog provider names vs ORT runtime EP names and point to the correct APIs for each source.
| /// The string literals below come from two sources that may use different names | |
| /// for the same provider: | |
| /// 1. ORT runtime — OrtEpDevice.EpName returned by ExecutionProviderCatalog.FindAllProviders() | |
| /// 2. Model catalog JSON — the "executionProviders[].name" field in files like | |
| /// Resources/SqueezeNetModelCatalog.json | |
| /// | |
| /// When a provider appears under different names in these two sources, both forms | |
| /// must be listed here so the lookup succeeds regardless of which name is passed in. | |
| /// If a new EP is added to the ORT runtime or the catalog introduces an alias, | |
| /// a corresponding entry should be added below. | |
| /// The string literals below may come from different sources that use different names | |
| /// for the same provider: | |
| /// 1. WinRT execution provider catalog names — returned by | |
| /// ExecutionProviderCatalog.FindAllProviders() as ExecutionProvider.Name | |
| /// 2. ORT runtime EP names — returned by ORT enumeration APIs such as | |
| /// OrtEnv.GetEpDevices() as OrtEpDevice.EpName; these are the names used by | |
| /// SessionOptions and OrtEpDevice | |
| /// 3. Model catalog JSON — the "executionProviders[].name" field in files like | |
| /// Resources/SqueezeNetModelCatalog.json | |
| /// | |
| /// When a provider appears under different names in these sources, each relevant form | |
| /// must be listed here so the lookup succeeds regardless of which name is passed in. | |
| /// If a new EP is added to the ORT runtime, WinRT catalog, or model catalog introduces | |
| /// an alias, a corresponding entry should be added below. |
Summary
The model catalog (\SqueezeNetModelCatalog.json) uses \NvTensorRTRTXExecutionProvider\ as the execution provider name for the \squeezenet-fp32\ model entry, but \PerformanceConfigurator.GetEpOptions()\ only matched the ORT runtime name \TensorRtRtxExecutionProvider.
This meant that when the catalog-supplied EP name was passed to the configurator, no performance options were applied.
Changes
Validation
Fixes AB#61791041